Documentation
¶
Index ¶
- func Absolute(category, key string, value int64)
- func Decrement(category, key string)
- func DecrementBy(category, key string, value int64)
- func Gauge(category, key string, value int64)
- func GetTimestamp(category string, key ...string) *time.Time
- func Increment(category string, key ...string)
- func IncrementBy(category, key string, value int64)
- func JoinArray(array []string, delimiter string) string
- func Register(h StatsInterface)
- func RegisterStats(statsKey string, callback func() interface{})
- func Stat(category, key string) int64
- func StatsMap() (util.MapStr, error)
- func Timestamp(category, key string, value time.Time)
- func TimestampNow(category string, key ...string)
- func Timing(category, key string, value int64)
- type StatsInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecrementBy ¶
func IncrementBy ¶
func Register ¶
func Register(h StatsInterface)
func RegisterStats ¶
func RegisterStats(statsKey string, callback func() interface{})
func TimestampNow ¶
record the last timestamp for specify operation
Types ¶
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)
Absolute(category, key string, value int64)
Timing(category, key string, v int64)
Gauge(category, key string, v int64)
Stat(category, key string) int64
StatsAll() string
//record the last timestamp for specify operation
RecordTimestamp(category, key string, value time.Time)
//get the last timestamp for specify operation
GetTimestamp(category, key string) (time.Time, error)
}
Click to show internal directories.
Click to hide internal directories.