Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatenateTags ¶
ConcatenateTags is a fast way to concatenate multiple tag arrays in a single one.
func StringInRuneset ¶
StringInRuneset tests whether all runes of a string are in a given subset returns false if any rune in the string is not found in the subset
Types ¶
type Expire ¶
Expire implements a simple last-seen-time-based expiry logic for watching for disappearing entities (for triggering events or just cache housekeeping). User classes define an expiry delay, then call Update every time they encounter a given entity. ComputeExpires() returns the entity names that have not been seen for longer than the configured delay. As Expire keeps an internal state of entity names, Update will return true if a name is new, false otherwise.
func NewExpire ¶
NewExpire creates a new Expire object. Called when a Collector is started. Only used for the ECS collector to start with.
func (*Expire) ComputeExpires ¶
ComputeExpires should be called right after an Update.
type TagList ¶
type TagList struct {
// contains filtered or unexported fields
}
TagList allows collector to incremental build a tag list then export it easily to []string format
func (*TagList) AddAuto ¶
AddAuto determine the tag cardinality and will call the proper method AddLow or AddHigh if the name value starts with '+' character
func (*TagList) AddHigh ¶
AddHigh adds a new high cardinality tag to the map, or replace if already exists. It will skip empty values/names, so it's safe to use without verifying the value is not empty.