metric

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	Count() int64
	Inc(int64)
	Dec(int64)
	Snapshot() Counter
	Clear()
}

func NewCounter

func NewCounter() Counter

type DateCounter

type DateCounter interface {
	TodayCount() int64
	GetLastDaysCount(lastdays int64) []int64
	Inc(int64)
	Dec(int64)
	Snapshot() DateCounter
	Clear()
}

func NewDateCounter

func NewDateCounter(reserveDays int64) DateCounter

type StandardCounter

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

func (*StandardCounter) Clear

func (c *StandardCounter) Clear()

func (*StandardCounter) Count

func (c *StandardCounter) Count() int64

func (*StandardCounter) Dec

func (c *StandardCounter) Dec(count int64)

func (*StandardCounter) Inc

func (c *StandardCounter) Inc(count int64)

func (*StandardCounter) Snapshot

func (c *StandardCounter) Snapshot() Counter

type StandardDateCounter

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

func (*StandardDateCounter) Clear

func (c *StandardDateCounter) Clear()

func (*StandardDateCounter) Dec

func (c *StandardDateCounter) Dec(count int64)

func (*StandardDateCounter) GetLastDaysCount

func (c *StandardDateCounter) GetLastDaysCount(lastdays int64) []int64

func (*StandardDateCounter) Inc

func (c *StandardDateCounter) Inc(count int64)

func (*StandardDateCounter) Snapshot

func (c *StandardDateCounter) Snapshot() DateCounter

func (*StandardDateCounter) TodayCount

func (c *StandardDateCounter) TodayCount() int64

Jump to

Keyboard shortcuts

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