Prefer RegisterTTL set through Init

This commit is contained in:
Asim
2016-01-27 12:23:18 +00:00
parent 61094fefe8
commit 013d1de2c4
6 changed files with 19 additions and 30 deletions

View File

@@ -22,8 +22,7 @@ type Options struct {
Registry registry.Registry
Transport transport.Transport
// Registration options
RegisterTTL time.Duration
// Register loop interval
RegisterInterval time.Duration
// Before and After funcs
@@ -125,7 +124,7 @@ func Action(a func(*cli.Context)) Option {
func RegisterTTL(t time.Duration) Option {
return func(o *Options) {
o.RegisterTTL = t
o.Server.Init(server.RegisterTTL(t))
}
}