Documentation ¶
Index ¶
- func Check(v *Config, workers map[eosc.RequireId]eosc.IWorker) error
- func Create(id, name string, cfg *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func NewFactory() eosc.IExtenderDriverFactory
- func Register(register eosc.IExtenderDriverRegister)
- type Config
- type MetricConfig
- type MetricType
- type PromOutput
- func (p *PromOutput) CheckSkill(skill string) bool
- func (p *PromOutput) Collect(metrics []string, entry eosc.IMetricEntry)
- func (p *PromOutput) FormatUpdateMetrics(oldMetrics, newMetrics []*MetricConfig, ...) (map[string]iMetric, bool, error)
- func (p *PromOutput) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) (err error)
- func (p *PromOutput) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (p *PromOutput) Start() error
- func (p *PromOutput) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory() eosc.IExtenderDriverFactory
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Register 注册prometheus_output驱动工厂
Types ¶
type Config ¶
type Config struct { Scopes []string `json:"scopes" label:"作用域"` Path string `json:"path" yaml:"path" required:"true" label:"Metrics路径"` Metrics []*MetricConfig `json:"metrics" yaml:"metrics" required:"true" label:"指标列表"` }
type MetricConfig ¶
type MetricConfig struct { Metric string `json:"metric" yaml:"metric" required:"true" label:"指标名"` Description string `json:"description" yaml:"description" required:"true" label:"指标描述"` Collector string `` /* 191-byte string literal not displayed */ Objectives string `` /* 237-byte string literal not displayed */ Labels []string `` /* 408-byte string literal not displayed */ }
type MetricType ¶
type MetricType string
type PromOutput ¶
type PromOutput struct { drivers.WorkerBase // contains filtered or unexported fields }
func (*PromOutput) CheckSkill ¶
func (p *PromOutput) CheckSkill(skill string) bool
func (*PromOutput) Collect ¶
func (p *PromOutput) Collect(metrics []string, entry eosc.IMetricEntry)
func (*PromOutput) FormatUpdateMetrics ¶
func (p *PromOutput) FormatUpdateMetrics(oldMetrics, newMetrics []*MetricConfig, newMetricsInfo map[string]*metricInfoCfg) (map[string]iMetric, bool, error)
FormatUpdateMetrics 返回更新后的metrics配置
func (*PromOutput) ServeHTTP ¶
func (p *PromOutput) ServeHTTP(writer http.ResponseWriter, request *http.Request)
func (*PromOutput) Start ¶
func (p *PromOutput) Start() error
func (*PromOutput) Stop ¶
func (p *PromOutput) Stop() error
Click to show internal directories.
Click to hide internal directories.