metrics

package
v0.0.0-...-a024992 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ViaPrometheus

func ViaPrometheus() cfg.Option[Config]

func WithPort

func WithPort(port int) cfg.Option[Config]

Types

type Config

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

type Metrics

type Metrics interface {
	IncSchedulerNextCalls()
	IncSelectorSelectCalls()
	IncSelectorSelectErrors()
	IncExecutorExecCalls(id string)
	IncExecutorExecErrors(id string)
	ObserveExecLatency(ctx context.Context, id string, dur time.Duration)
	IncExecutorNextCalls(id string)
	IsUp(bool)

	Shutdown(ctx context.Context) error
}

func New

func New(options ...cfg.Option[Config]) (Metrics, error)

func NoOp

func NoOp() Metrics

type Prometheus

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

func (Prometheus) IncExecutorExecCalls

func (m Prometheus) IncExecutorExecCalls(id string)

func (Prometheus) IncExecutorExecErrors

func (m Prometheus) IncExecutorExecErrors(id string)

func (Prometheus) IncExecutorNextCalls

func (m Prometheus) IncExecutorNextCalls(id string)

func (Prometheus) IncSchedulerNextCalls

func (m Prometheus) IncSchedulerNextCalls()

func (Prometheus) IncSelectorSelectCalls

func (m Prometheus) IncSelectorSelectCalls()

func (Prometheus) IncSelectorSelectErrors

func (m Prometheus) IncSelectorSelectErrors()

func (Prometheus) IsUp

func (m Prometheus) IsUp(up bool)

func (Prometheus) ObserveExecLatency

func (m Prometheus) ObserveExecLatency(ctx context.Context, id string, dur time.Duration)

func (Prometheus) Registry

func (m Prometheus) Registry() (*prometheus.Registry, error)

func (Prometheus) Shutdown

func (m Prometheus) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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