topk

package
v0.0.0-...-3611cfd Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CountTag        = "count"
	PreSamplingTag  = "pre_sampling"
	PostSamplingTag = "post_sampling"
	CETag           = "ce_event"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NullProjectTracker

type NullProjectTracker struct{}

func (*NullProjectTracker) Close

func (p *NullProjectTracker) Close()

func (*NullProjectTracker) Track

func (p *NullProjectTracker) Track(projectId int32, tags ...string)

type ProjectTracker

type ProjectTracker interface {
	Track(projectId int32, tags ...string)
	Close()
}

func NewProjectTracker

func NewProjectTracker(client mixpanel.Client,
	receiver metrics.Receiver,
	flushInterval time.Duration,
	eventName string) ProjectTracker

type Receiver

type Receiver interface {
	Track(int32)
	Close()
}

A best-effort receiver. We buffer up to chanBufferSize values, and process them in a single goroutine. The top K values will be reported to the provided Receiver.

func New

func New(metrics metrics.Receiver, k int) Receiver

Jump to

Keyboard shortcuts

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