MCPcopy
hub / github.com/netdata/netdata / applyOptions

Function applyOptions

src/go/plugin/framework/chartengine/options.go:156–170  ·  view source on GitHub ↗
(opts ...Option)

Source from the content-addressed store, hash-verified

154}
155
156func applyOptions(opts ...Option) (engineConfig, error) {
157 cfg := engineConfig{
158 autogen: defaultAutogenPolicy(),
159 seriesSelection: seriesSelectionLastSuccessOnly,
160 }
161 for i, opt := range opts {
162 if opt == nil {
163 continue
164 }
165 if err := opt(&cfg); err != nil {
166 return engineConfig{}, fmt.Errorf("chartengine: option[%d]: %w", i, err)
167 }
168 }
169 return cfg, nil
170}

Callers 1

NewFunction · 0.85

Calls 2

defaultAutogenPolicyFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…