Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(configPath string, fn func(CollectorConfig)) error
LoadConfig watch configPath change, callback fn
Types ¶
type Collector ¶
type Collector struct { TargetName string TargetConfig // contains filtered or unexported fields }
Collector Collect target pprof http endpoints
type CollectorConfig ¶
type CollectorConfig struct { //key TargetName TargetConfigs map[string]TargetConfig `yaml:"targetConfigs"` }
type Config ¶
type Config struct {
Collector CollectorConfig `yaml:"collector"`
}
type LabelConfig ¶
func (LabelConfig) ToArray ¶
func (t LabelConfig) ToArray() []storage.Label
type Manger ¶
type Manger struct {
// contains filtered or unexported fields
}
Manger Manage multiple collectors to scraping
func (*Manger) Load ¶
func (manger *Manger) Load(config CollectorConfig)
Load collector configuration It can be called multiple times, and the collector updates the configuration
type ProfileConfig ¶
type TargetConfig ¶
type TargetConfig struct { //key is profile name (profile, fgprof, mutex, heap, goroutine, allocs, block, threadcreate) ProfileConfigs map[string]ProfileConfig `yaml:"profileConfigs"` Interval time.Duration `yaml:"interval"` Expiration time.Duration `yaml:"expiration"` Instances []string `yaml:"instances"` Labels LabelConfig `yaml:"labels"` }
Click to show internal directories.
Click to hide internal directories.