Documentation
¶
Overview ¶
Package volatile drops provider-declared volatile fields from resource AttributesJSON at the store boundary, BEFORE the version-comparison in Store.UpsertResources.
Some cloud APIs return fields that change on every read independent of any real resource change — e.g. CloudWatch Logs returns a fresh, deprecated UploadSequenceToken on every DescribeLogStreams call. Storing such a field version-splits an otherwise-unchanged resource on every scan, falsely reporting it as "changed". Unlike redaction (which replaces a value with "[REDACTED]"), volatile rules REMOVE the key entirely, so stored attributes honestly reflect only the fields disco tracks — no stale value left behind.
Provider packages register per-type rules in their init() blocks (see internal/providers/aws/aws_volatile.go). Store.UpsertResources calls Apply once per row, right after redact.Apply and before the jsonEqual comparison.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply removes every registered volatile path from attributesJSON, returning input unchanged when no rules exist or JSON parse/marshal fails — callers never want a silently dropped row.