Add back the old tunnel interface

This commit is contained in:
Asim Aslam
2019-08-07 18:44:33 +01:00
parent 380d9790e6
commit 117376a922
7 changed files with 675 additions and 126 deletions

View File

@@ -3,6 +3,7 @@ package tunnel
import (
"github.com/google/uuid"
"github.com/micro/go-micro/transport"
"github.com/micro/go-micro/transport/quic"
)
var (
@@ -39,7 +40,7 @@ func Address(a string) Option {
}
// Nodes specify remote network nodes
func Nodes(n []string) Option {
func Nodes(n ...string) Option {
return func(o *Options) {
o.Nodes = n
}
@@ -57,7 +58,6 @@ func DefaultOptions() Options {
return Options{
Id: uuid.New().String(),
Address: DefaultAddress,
Nodes: make([]string, 0),
Transport: transport.DefaultTransport,
Transport: quic.NewTransport(),
}
}