Documentation
¶
Overview ¶
Package metricevents provides a way to track state changes in specific cloud monitoring metrics. On state transitions, a cloud logging metric is written.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEvent ¶
func AddEvent(ctx context.Context, p Parameters) bool
AddEvent adds an event to the list of events. If the event already exists, a cloud logging message is written if the value has changed. Returns true if an event incurs a state change.
func SetLogDelay ¶
SetLogDelay changes how long to wait for a group of events before logging.
Types ¶
type Parameters ¶
type Parameters struct { Path string Message string Value string Labels map[string]string // Identifier is used to distinguish between events with the same path. // The identifier is appended to the path to create a unique key for the // event in the event map. Identifier string }
Parameters for AddEvent.
Click to show internal directories.
Click to hide internal directories.