Help us shape the future of Go! Take the 2026 Go Developer Survey

metrics

package
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package metrics exports the host's media worker queue health. It is kept separate from workqueue so a host can enqueue without linking Prometheus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector serves the latest queue snapshot read by an always-on host's River leader. A one-shot media worker can scale to zero and cannot expose backlog.

func NewCollector

func NewCollector(pool *pgxpool.Pool, schema string) (*Collector, error)

NewCollector returns queue metrics for one worker schema.

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (*Collector) Describe(ch chan<- *prometheus.Desc)

func (*Collector) LeaderHook

func (c *Collector) LeaderHook() rivertype.Hook

LeaderHook starts queue polling only while this River client holds leadership.

Jump to

Keyboard shortcuts

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