router: update interface (#1732)

* router: replace Start and Stop with Close

* router: update default network to micro

* router: update tests
This commit is contained in:
ben-toogood
2020-06-24 11:09:16 +01:00
committed by GitHub
parent 695cc9d526
commit c940961574
8 changed files with 33 additions and 42 deletions

View File

@@ -11,7 +11,7 @@ var (
// DefaultName is default router service name
DefaultName = "go.micro.router"
// DefaultNetwork is default micro network
DefaultNetwork = "go.micro"
DefaultNetwork = "micro"
// DefaultRouter is default network router
DefaultRouter = NewRouter()
)
@@ -32,10 +32,8 @@ type Router interface {
Lookup(...QueryOption) ([]Route, error)
// Watch returns a watcher which tracks updates to the routing table
Watch(opts ...WatchOption) (Watcher, error)
// Start starts the router
Start() error
// Stop stops the router
Stop() error
// Close the router
Close() error
// Returns the router implementation
String() string
}