Add default router

This commit is contained in:
Asim Aslam 2019-06-27 12:57:23 +01:00
parent f6f6e1b561
commit 43297f731c
2 changed files with 5 additions and 0 deletions

View File

@ -67,5 +67,6 @@ func DefaultOptions() Options {
Address: DefaultAddress,
Registry: registry.DefaultRegistry,
Table: NewTable(),
Network: "local",
}
}

View File

@ -26,6 +26,10 @@ type Router interface {
// Option used by the router
type Option func(*Options)
var (
DefaultRouter = NewRouter()
)
// NewRouter creates new Router and returns it
func NewRouter(opts ...Option) Router {
return newRouter(opts...)