common

package
v0.0.0-...-cb6d2b4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAvailableClients = errors.New("no available clients")

Functions

func Assert

func Assert(err error)

func GetError

func GetError(ctx context.Context) error

func Hung

func Hung()

func WithError

func WithError(ctx context.Context, err error) context.Context

Types

type Adder

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

func NewAdder

func NewAdder() *Adder

func (*Adder) Add

func (this *Adder) Add(key string, addValue uint64)

func (*Adder) Clean

func (this *Adder) Clean()

func (*Adder) Get

func (this *Adder) Get(key string) uint64

func (*Adder) List

func (this *Adder) List() (keys []string)

type KV

type KV struct {
	Key    string
	Weight int
}

type SimpleQueue

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

func NewSimpleQueue

func NewSimpleQueue() *SimpleQueue

func (*SimpleQueue) GetAverage

func (this *SimpleQueue) GetAverage(t time.Time) int64

func (*SimpleQueue) GetMax

func (this *SimpleQueue) GetMax(t time.Time) int64

func (*SimpleQueue) GetMost

func (this *SimpleQueue) GetMost(t time.Time) int64

func (*SimpleQueue) Insert

func (this *SimpleQueue) Insert(data int64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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