MCPcopy Index your code
hub / github.com/netdata/netdata / normalizeAutogenPolicy

Function normalizeAutogenPolicy

src/go/plugin/framework/chartengine/options.go:67–77  ·  view source on GitHub ↗
(policy AutogenPolicy)

Source from the content-addressed store, hash-verified

65}
66
67func normalizeAutogenPolicy(policy AutogenPolicy) (AutogenPolicy, error) {
68 maxLen := policy.MaxTypeIDLen
69 if maxLen <= 0 {
70 maxLen = defaultMaxTypeIDLen
71 }
72 if maxLen < 4 {
73 return AutogenPolicy{}, fmt.Errorf("autogen max type.id len must be >= 4, got %d", maxLen)
74 }
75 policy.MaxTypeIDLen = maxLen
76 return policy, nil
77}
78
79func compileEngineSelector(expr metrixselector.Expr) (metrixselector.Selector, error) {
80 if expr.Empty() {

Callers 2

WithEnginePolicyFunction · 0.85
resolveEffectivePolicyFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…