cardinal

package module
v0.0.0-...-802364b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2015 License: MIT Imports: 2 Imported by: 1

README

#Cardinal

a simple way to measure cardinality of a stream using a circular buffer of sets for smarter anomaly detection and response.

DOCS LICENSE

Documentation

Index

Constants

View Source
const (
	CHUNKS     = 10
	CHUNK_SIZE = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cardinal

type Cardinal struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(duration time.Duration) *Cardinal

func (*Cardinal) Add

func (c *Cardinal) Add(token string)

func (*Cardinal) Cardinality

func (c *Cardinal) Cardinality() (r float64)

func (*Cardinal) Check

func (c *Cardinal) Check(token string) (r bool)

func (*Cardinal) Count

func (c *Cardinal) Count() (r uint64)

func (*Cardinal) Duration

func (c *Cardinal) Duration() time.Duration

func (*Cardinal) Reset

func (c *Cardinal) Reset()

func (*Cardinal) Uniques

func (c *Cardinal) Uniques() (r uint64)

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL