Documentation ¶
Overview ¶
Package lastseen implements a last-seen sketch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sketch ¶
Sketch is a last-seen sketch.
func NewSketch ¶
NewSketch returns a sketch that can hold N elements, offering ~1% false positives for lookups. N should be at most 45805.
func (Sketch) Capacity ¶
Capacity returns the maximum number of distinct elements that can be held by the sketch with ~1% false positives
func (Sketch) CountDistinct ¶
CountDistinct returns the minimum number of distinct elements seen since the given time.
func (Sketch) Lookup ¶
Lookup returns the latest possible time that the key could have been updated in the sketch. The zero time is returned if the key has never been updated.
func (Sketch) LookupAndUpdate ¶
LookupAndUpdate returns the current timestamp for key and updates it.
Click to show internal directories.
Click to hide internal directories.