Add Address method. Start and Stop router/server.

This commit is contained in:
Milos Gajdos
2019-08-21 19:16:18 +01:00
parent 6c1f1d66f7
commit a09d5d2e9a
2 changed files with 28 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ var (
DefaultName = "go.micro.network"
// DefaultAddress is default network address
DefaultAddress = ":0"
// ResolveTime ddefines the time we periodically resolve network nodes
// ResolveTime ddefines the time to periodically resolve network nodes
ResolveTime = 1 * time.Minute
)
@@ -21,6 +21,8 @@ var (
type Network interface {
// Name of the network
Name() string
// Address returns network bind address
Address() string
// Connect starts the resolver and tunnel server
Connect() error
// Close stops the tunnel and resolving