MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / GuardrailConfig

Struct GuardrailConfig

internal/estimate/guardrail.go:12–23  ·  view source on GitHub ↗

GuardrailConfig holds the thresholds a cost estimate is judged against. All fields are optional pointers: a nil pointer means "this check is disabled". When every field is nil the guardrail is purely informational and always passes.

Source from the content-addressed store, hash-verified

10// When every field is nil the guardrail is purely informational and always
11// passes.
12type GuardrailConfig struct {
13 // Budget is the absolute monthly ceiling in USD. The estimate breaches when
14 // its monthly total exceeds this value.
15 Budget *float64
16 // Baseline is the monthly total (USD) of the comparison point — typically the
17 // base branch's estimate. Setting it enables the relative-increase checks.
18 Baseline *float64
19 // MaxIncrease is the largest allowed absolute increase in USD over Baseline.
20 MaxIncrease *float64
21 // MaxIncreasePct is the largest allowed percentage increase over Baseline.
22 MaxIncreasePct *float64
23}
24
25// Enabled reports whether any threshold is configured. When false the guardrail
26// only reports numbers and never fails.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected