Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeMonitor ¶
type ChangeMonitor struct {
// contains filtered or unexported fields
}
ChangeMonitor is used to reduce logging when discovering information that may change. The values recorded expire after 24 hours by default to prevent a value from being logged at startup only which could impede debugging if full sets of logs aren't available.
func NewChangeMonitor ¶
func NewChangeMonitor() *ChangeMonitor
func (*ChangeMonitor) HasChanged ¶
func (c *ChangeMonitor) HasChanged(key string, value any) bool
HasChanged takes a key and value and returns true if the hash of the value has changed since the last tine the change monitor was called.
func (*ChangeMonitor) Reconfigure ¶
func (c *ChangeMonitor) Reconfigure(expiration time.Duration)
Reconfigure allows reconfiguring the change monitor with a new duration. This resets any previously recorded changes and should only be done at construction.
Click to show internal directories.
Click to hide internal directories.