prom

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAMESPACE = "cloudflare"

	SUBSYS_GLOBAL  = "globals"
	SUBSYS_JOB     = "jobs"
	SUBSYS_ZONE    = "zones"
	SUBSYS_ACCOUNT = "accounts"
)

Variables

This section is empty.

Functions

func MustRegister

func MustRegister[C prometheus.Collector](prom *Prometheus, system string, name string, getCollector func(name string, config *viper.Viper) C) (collector C)

Types

type JobMonitor

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

func NewJobMonitor

func NewJobMonitor(logger *zap.Logger, execTotal *prometheus.CounterVec, execTime *prometheus.HistogramVec) *JobMonitor

func (*JobMonitor) IncrementJob

func (m *JobMonitor) IncrementJob(id uuid.UUID, name string, tags []string, status gocron.JobStatus)

func (*JobMonitor) RecordJobTiming

func (m *JobMonitor) RecordJobTiming(startTime, endTime time.Time, id uuid.UUID, name string, tags []string)

type Prometheus

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

func New

func New(config *viper.Viper) *Prometheus

func (*Prometheus) Handler

func (r *Prometheus) Handler() fiber.Handler

Jump to

Keyboard shortcuts

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