process

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandMetricsFromConfig

func ExpandMetricsFromConfig(ctx context.Context, conn *db.Connector, cfg *config.MetricsConfig) (tables map[string]struct{}, err error)

func GetStableNameListSql added in v1.0.26

func GetStableNameListSql() string

Types

type CollectType

type CollectType string
const (
	Counter CollectType = "counter"
	Gauge   CollectType = "gauge"
	Info    CollectType = "info"
	Summary CollectType = "summary"
)

type Metric

type Metric struct {
	sync.RWMutex
	FQName      string
	Help        string
	Type        CollectType
	ColType     int
	ConstLabels map[string]string
	Variables   []string
	Desc        *prometheus.Desc
	LastValue   []*Value
}

func (*Metric) GetValue

func (m *Metric) GetValue() []*Value

func (*Metric) SetValue

func (m *Metric) SetValue(v []*Value)

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(conf *config.Config) *Processor

func (*Processor) Close

func (p *Processor) Close() error

func (*Processor) Collect

func (p *Processor) Collect(metrics chan<- prometheus.Metric)

func (*Processor) Describe

func (p *Processor) Describe(descs chan<- *prometheus.Desc)

func (*Processor) GetMetric

func (p *Processor) GetMetric() map[string]*Metric

func (*Processor) Prepare

func (p *Processor) Prepare()

func (*Processor) Process added in v1.0.26

func (p *Processor) Process()

type Table

type Table struct {
	Variables  []string
	ColumnList []string
	// contains filtered or unexported fields
}

type Value

type Value struct {
	Label map[string]string
	Value interface{}
}

Jump to

Keyboard shortcuts

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