Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggrMethodType ¶
type AggrMethodType string
聚合方法
const AggrAvg AggrMethodType = "avg" //求平均
const AggrLast AggrMethodType = "last" //取最后
const AggrSum AggrMethodType = "sum" //求和
type IOpStatistical ¶
type IOpStatistical interface { IStatistical RegIndicator(IIndicator) //注册指标器 }
统计器接口
type IStatistical ¶
type IStatistical interface {
Push(name string, value float64, opts ...StsOpt) IStatistical
}
统计器接口
type LogIndicator ¶
type LogIndicator struct {
// contains filtered or unexported fields
}
type OpStatistical ¶
统计器
func NewOpStatistical ¶
func NewOpStatistical(label string, interval int64) *OpStatistical
func (*OpStatistical) Start ¶
func (st *OpStatistical) Start()
type PrometheusIndicator ¶
type PrometheusIndicator struct {
// contains filtered or unexported fields
}
todo 指标上报至prometheus
func NewPrometheusIndicator ¶
func NewPrometheusIndicator(label string) *PrometheusIndicator
func (*PrometheusIndicator) Report ¶
func (l *PrometheusIndicator) Report(data map[string]*IndicData)
上报数据
Click to show internal directories.
Click to hide internal directories.