add logging and don't get nodes where they exist in router (#1898)

* add logging and don't get nodes where they exist in router

* add more logging
This commit is contained in:
Asim Aslam
2020-08-06 11:32:06 +01:00
committed by GitHub
parent 8674dc8e62
commit 2b79910ad9
3 changed files with 37 additions and 6 deletions

View File

@@ -24,6 +24,8 @@ type Options struct {
Advertise Strategy
// Context for additional options
Context context.Context
// Precache routes
Precache bool
}
// Id sets Router Id
@@ -68,6 +70,13 @@ func Advertise(a Strategy) Option {
}
}
// Precache the routes
func Precache() Option {
return func(o *Options) {
o.Precache = true
}
}
// DefaultOptions returns router default options
func DefaultOptions() Options {
return Options{