1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00

Merge pull request #141 from simplechris/consul-configuration

Remove consul token helper method.
This commit is contained in:
Asim Aslam 2016-11-21 17:39:28 +01:00 committed by GitHub
commit 22f212c274
2 changed files with 0 additions and 13 deletions

View File

@ -14,12 +14,3 @@ func Config(c *consul.Config) registry.Option {
o.Context = context.WithValue(o.Context, "consul_config", c)
}
}
func Token(t string) registry.Option {
return func(o *registry.Options) {
if o.Context == nil {
o.Context = context.Background()
}
o.Context = context.WithValue(o.Context, "consul_token", t)
}
}

View File

@ -58,10 +58,6 @@ func newConsulRegistry(opts ...Option) Registry {
if c, ok := options.Context.Value("consul_config").(*consul.Config); ok {
config = c
}
if t, ok := options.Context.Value("consul_token").(string); ok {
config.Token = t
}
}
// set timeout