prometheus

package
v0.17.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(v *Config, workers map[eosc.RequireId]eosc.IWorker) error

func Create

func Create(id, name string, cfg *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

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:"作用域"`
	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) Reset

func (p *PromOutput) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) (err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL