stats

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrement

func Decrement(category, key string)

func DecrementBy

func DecrementBy(category, key string, value int64)

func Gauge

func Gauge(category, key string, value int64)

func Increment

func Increment(category, key string)

func IncrementBy

func IncrementBy(category, key string, value int64)

func Init

func Init()

func Register

func Register(h StatsInterface)

func Stat

func Stat(category, key string) int64

func StatsAll

func StatsAll() *[]byte

func Timing

func Timing(category, key string, value int64)

Types

type Stats

type Stats struct {
	ID   string                       `storm:"id,unique" json:"id" gorm:"not null;unique;primary_key"`
	Data *map[string]map[string]int64 `storm:"inline" json:"data,omitempty"`
}

type StatsCount

type StatsCount struct {
	TotalCount   int `json:"total,omitempty"`
	SuccessCount int `json:"success,omitempty"`
	FailCount    int `json:"fail,omitempty"`
	Ignore       int `json:"ignore,omitempty"`
	Timeout      int `json:"timeout,omitempty"`
}

type StatsInterface

type StatsInterface interface {
	Increment(category, key string)

	IncrementBy(category, key string, value int64)

	Decrement(category, key string)

	DecrementBy(category, key string, value int64)

	Timing(category, key string, v int64)

	Gauge(category, key string, v int64)

	Stat(category, key string) int64

	StatsAll() *[]byte
}

type TaskStatus

type TaskStatus struct {
	Stats map[string]map[string]int `json:"stats"`
}

Jump to

Keyboard shortcuts

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