MCPcopy
hub / github.com/gogf/gf / Client

Struct Client

contrib/config/consul/consul.go:43–52  ·  view source on GitHub ↗

Client implements gcfg.Adapter implementing using consul service.

Source from the content-addressed store, hash-verified

41
42// Client implements gcfg.Adapter implementing using consul service.
43type 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.
55func New(ctx context.Context, config Config) (adapter gcfg.Adapter, err error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected