MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithConfigWatcher

Function WithConfigWatcher

c.go:110–114  ·  view source on GitHub ↗

WithConfigWatcher is a CoreOption that adds a config watcher to the core (for hot reloading configs).

(watcher contract.ConfigWatcher)

Source from the content-addressed store, hash-verified

108
109// WithConfigWatcher is a CoreOption that adds a config watcher to the core (for hot reloading configs).
110func WithConfigWatcher(watcher contract.ConfigWatcher) CoreOption {
111 return func(values *coreValues) {
112 values.configWatcher = watcher
113 }
114}
115
116// SetConfigProvider is a CoreOption to replaces the default ConfigProvider.
117func SetConfigProvider(provider ConfigProvider) CoreOption {

Callers 3

TestModule_hotReloadFunction · 0.92
WithKeyFunction · 0.92
WithYamlFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestModule_hotReloadFunction · 0.74