Client implements gcfg.Adapter implementing using consul service.
| 41 | |
| 42 | // Client implements gcfg.Adapter implementing using consul service. |
| 43 | type Client struct { |
| 44 | // Created config object |
| 45 | config Config |
| 46 | // Consul config client |
| 47 | client *api.Client |
| 48 | // Configmap content cached. It is `*gjson.Json` value internally. |
| 49 | value *g.Var |
| 50 | // Watchers for watching file changes. |
| 51 | watchers *gcfg.WatcherRegistry |
| 52 | } |
| 53 | |
| 54 | // New creates and returns gcfg.Adapter implementing using consul service. |
| 55 | func New(ctx context.Context, config Config) (adapter gcfg.Adapter, err error) { |
nothing calls this directly
no outgoing calls
no test coverage detected