Add default router
This commit is contained in:
parent
f6f6e1b561
commit
43297f731c
@ -67,5 +67,6 @@ func DefaultOptions() Options {
|
|||||||
Address: DefaultAddress,
|
Address: DefaultAddress,
|
||||||
Registry: registry.DefaultRegistry,
|
Registry: registry.DefaultRegistry,
|
||||||
Table: NewTable(),
|
Table: NewTable(),
|
||||||
|
Network: "local",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,10 @@ type Router interface {
|
|||||||
// Option used by the router
|
// Option used by the router
|
||||||
type Option func(*Options)
|
type Option func(*Options)
|
||||||
|
|
||||||
|
var (
|
||||||
|
DefaultRouter = NewRouter()
|
||||||
|
)
|
||||||
|
|
||||||
// NewRouter creates new Router and returns it
|
// NewRouter creates new Router and returns it
|
||||||
func NewRouter(opts ...Option) Router {
|
func NewRouter(opts ...Option) Router {
|
||||||
return newRouter(opts...)
|
return newRouter(opts...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user