Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabelSetTracker ¶
type LabelSetTracker struct {
// contains filtered or unexported fields
}
func NewLabelSetTracker ¶
func NewLabelSetTracker() *LabelSetTracker
NewLabelSetTracker initializes a LabelSetTracker to keep track of active labelset limits.
func (*LabelSetTracker) Track ¶
func (m *LabelSetTracker) Track(userId string, hash uint64, labelSet labels.Labels)
Track accepts userID, label set and hash of the label set limit.
func (*LabelSetTracker) UpdateMetrics ¶
func (m *LabelSetTracker) UpdateMetrics(userSet map[string]map[uint64]struct{}, deleteMetricFunc func(user, labelSetStr string, removeUser bool))
UpdateMetrics cleans up dangling user and label set from the tracker as well as metrics. It takes a function for user to customize the metrics cleanup logic when either a user or a specific label set is removed. If a user is removed then removeUser is set to true.
Click to show internal directories.
Click to hide internal directories.