mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
registry: rename context key "consul_register_tcp_check" to "consul_tcp_check"
This commit is contained in:
parent
65a90f5a21
commit
44b934d458
@ -32,6 +32,6 @@ func TCPCheck(t time.Duration) registry.Option {
|
||||
if o.Context == nil {
|
||||
o.Context = context.Background()
|
||||
}
|
||||
o.Context = context.WithValue(o.Context, "consul_register_tcp_check", t)
|
||||
o.Context = context.WithValue(o.Context, "consul_tcp_check", t)
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ func (c *consulRegistry) Register(s *Service, opts ...RegisterOption) error {
|
||||
}
|
||||
|
||||
if c.opts.Context != nil {
|
||||
if tcpCheckInterval, ok := c.opts.Context.Value("consul_register_tcp_check").(time.Duration); ok {
|
||||
if tcpCheckInterval, ok := c.opts.Context.Value("consul_tcp_check").(time.Duration); ok {
|
||||
regTCPCheck = true
|
||||
regInterval = tcpCheckInterval
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user