Documentation
¶
Overview ¶
Package degradation supports graceful degradation for describe/list commands: when a recoverable YAML-function error occurs (e.g. a Terraform backend that has not been provisioned yet), the caller may substitute AtmosComputedValue for the unresolved value and continue instead of aborting. Warning tracks one such substitution, and Collector accumulates them across a single command run for an end-of-command summary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtmosComputedValue ¶
type AtmosComputedValue struct{}
AtmosComputedValue is substituted for a value that could not be resolved — most often because the underlying Terraform backend/state isn't accessible yet (not provisioned, not applied, not authenticated, or not the caller's most recent state). It is only substituted when a caller opts into lenient processing (list/describe --error-mode=warn|silent).
AtmosComputedValue renders as the literal "(computed)" in every output format without any renderer needing to special-case it: text/template and fmt.Fprint call String() automatically for any fmt.Stringer, and encoding/json and gopkg.in/yaml.v3 call MarshalJSON/MarshalYAML automatically for any value implementing those interfaces.
func (AtmosComputedValue) MarshalJSON ¶
func (AtmosComputedValue) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (AtmosComputedValue) MarshalYAML ¶
func (AtmosComputedValue) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler (gopkg.in/yaml.v3).
func (AtmosComputedValue) String ¶
func (AtmosComputedValue) String() string
String implements fmt.Stringer.
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector accumulates Warnings during a single command run and can produce a one-line UI-facing summary. Not safe for concurrent use — matches the single-threaded describe-stacks processing pass.
func (*Collector) Add ¶
Add records one degraded value. The full detail is always logged at debug level (visible with --logs-level=Debug); whether a user-facing summary is ever shown is up to the caller — see Summary.