registry: rename context key "consul_register_tcp_check" to "consul_tcp_check"
This commit is contained in:
		| @@ -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 | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user