Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricInc = "Inc" MetricTiming = "Timing" )
Variables ¶
This section is empty.
Functions ¶
func GetResCount ¶
func GetResCount[T model.Resource | k8sgathermodel.KubernetesGatherResource](res T) map[string][]int
func NewStatsdMonitor ¶
func NewStatsdMonitor(cfg config.StatsdConfig) error
Types ¶
type CloudStatsd ¶
type CloudStatsd struct { APICount map[string][]int APICost map[string][]int ResCount map[string][]int }
func NewCloudStatsd ¶
func NewCloudStatsd() CloudStatsd
func (*CloudStatsd) RefreshAPICost ¶
func (c *CloudStatsd) RefreshAPICost(key string, start time.Time)
func (*CloudStatsd) RefreshAPICount ¶
func (c *CloudStatsd) RefreshAPICount(key string, count int)
func (*CloudStatsd) RefreshResCount ¶
func (c *CloudStatsd) RefreshResCount(resource model.Resource)
type CloudTaskStatsd ¶
type GenesisStatsd ¶
type StatsdElement ¶
type StatsdElement struct { // metric type (specified by a constant) MetricType string // influxdb measurement name (if there is a configuration prefix, the prefix must be added) MetricName string // the default value is 1.0, usually no modification is required Rate float32 // use global tags UseGlobalTag bool // private tag key PrivateTagKey string // private tag value to count // when the type is Timing,unit is: ms // since this is a map, concurrent writing is not supported and locks can be used if required. // future: it might be useful sync.Map PrivateTagValueToCount map[string][]int }
func GetCloudStatsd ¶
func GetCloudStatsd(cloud CloudStatsd) []StatsdElement
func GetCloudTaskStatsd ¶
func GetCloudTaskStatsd(cloud CloudTaskStatsd) []StatsdElement
func GetGenesisStatsd ¶
func GetGenesisStatsd(genesis GenesisStatsd) []StatsdElement
type StatsdMonitor ¶
type StatsdMonitor struct {
// contains filtered or unexported fields
}
var MetaStatsd *StatsdMonitor
func (*StatsdMonitor) RegisterStatsdTable ¶
func (s *StatsdMonitor) RegisterStatsdTable(statter Statsdtable)
type StatsdStatter ¶
type StatsdStatter struct { Element []StatsdElement GlobalTags map[string]string }
type Statsdtable ¶
type Statsdtable interface {
GetStatter() StatsdStatter
}
Click to show internal directories.
Click to hide internal directories.