metric

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = compogo.Component{
	Name: "runner.middleware.metric",
	Dependencies: compogo.Components{
		&runner.Component,
	},
	Init: compogo.StepFunc(func(container compogo.Container) error {
		return container.Provide(NewMetric)
	}),
	PreExecute: compogo.StepFunc(func(container compogo.Container) error {
		return container.Invoke(func(r runner.Runner, middleware *Metric) {
			r.Use(middleware)
		})
	}),
}

Component — компонент middleware метрик для runner.Runner.

Functions

This section is empty.

Types

type Metric

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

Metric — middleware для сбора метрик Prometheus. Считает количество запусков процессов.

func NewMetric

func NewMetric(appConfig *compogo.Config) *Metric

func (*Metric) Middleware

func (m *Metric) Middleware(_ runner.Process, next runner.ProcessFunc) runner.ProcessFunc

Jump to

Keyboard shortcuts

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