add feature tls config stuff
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
883757b7f8
commit
4c529af53f
@ -59,6 +59,11 @@ func (c *consulConfig) Init(opts ...config.Option) error {
|
||||
if v, ok := c.opts.Context.Value(pathKey{}).(string); ok {
|
||||
path = v
|
||||
}
|
||||
/*
|
||||
if v, ok := c.opts.Context.Value(tlsConfigKey{}).(*tls.Config); ok {
|
||||
cfg.TLSConfig = *v
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
cli, err := api.NewClient(cfg)
|
||||
|
@ -28,3 +28,11 @@ type pathKey struct{}
|
||||
func Path(path string) config.Option {
|
||||
return config.SetOption(pathKey{}, path)
|
||||
}
|
||||
|
||||
/*
|
||||
type tlsConfigKey struct{}
|
||||
|
||||
func TLSConfig(t *tls.Config) config.Option {
|
||||
return config.SetOption(tlsConfigKey{}, t)
|
||||
}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user