stats

package
v0.0.0-...-678c32f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleStatsConfig

type SimpleStatsConfig struct {
	Persist bool `config:"persist"`
}

type SimpleStatsModule

type SimpleStatsModule struct {
	api.Handler
	// contains filtered or unexported fields
}

func (SimpleStatsModule) Name

func (module SimpleStatsModule) Name() string

func (SimpleStatsModule) Setup

func (module SimpleStatsModule) Setup(cfg *Config)

func (SimpleStatsModule) Start

func (module SimpleStatsModule) Start() error

func (SimpleStatsModule) StatsAction

func (handler SimpleStatsModule) StatsAction(w http.ResponseWriter, req *http.Request)

StatsAction return stats information

func (SimpleStatsModule) Stop

func (module SimpleStatsModule) Stop() error

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"`
	// contains filtered or unexported fields
}

func (*Stats) Decrement

func (s *Stats) Decrement(category, key string)

func (*Stats) DecrementBy

func (s *Stats) DecrementBy(category, key string, value int64)

func (*Stats) Gauge

func (s *Stats) Gauge(category, key string, v int64)

func (*Stats) Increment

func (s *Stats) Increment(category, key string)

func (*Stats) IncrementBy

func (s *Stats) IncrementBy(category, key string, value int64)

func (*Stats) Stat

func (s *Stats) Stat(category, key string) int64

func (*Stats) StatsAll

func (s *Stats) StatsAll() *[]byte

func (*Stats) Timing

func (s *Stats) Timing(category, key string, v int64)

Jump to

Keyboard shortcuts

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