Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupedSet ¶
type GroupedSet struct {
// contains filtered or unexported fields
}
func NewGroupedSet ¶
func NewGroupedSet(maxGroups, maxSetSize int) *GroupedSet
func (*GroupedSet) Add ¶
func (gs *GroupedSet) Add(g uint64, namespace, v []byte) (bool, error)
Add attempts to add the given value for the given group if not already present.
func (*GroupedSet) Contains ¶
func (gs *GroupedSet) Contains(g uint64, namespace, v []byte) (bool, error)
Contains checks if the given value at given group is present, and if so updates its recency. Otherwise, returns false.
func (*GroupedSet) RemoveGroupsLessThan ¶
func (gs *GroupedSet) RemoveGroupsLessThan(group uint64) bool
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func NewSet ¶
NewSet creates a new Set with a specified max size per sample subset. The max size cannot be less than 1; if it is the cache will silently be instantiated with max size of 1.
Click to show internal directories.
Click to hide internal directories.