prom

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 9 Imported by: 0

README

GOAL

  • Provider a friendly way to use prometheus metrics sdk.

Documentation

Index

Constants

View Source
const Namespace = "namespace"

Variables

View Source
var Factories = make(map[string]func() (Collector, error))

Functions

func DelegateHandler

func DelegateHandler(w http.ResponseWriter, r *http.Request)

func Init

func Init()

Types

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Update(ch chan<- prometheus.Metric) error
}

type DelegateCollector

type DelegateCollector struct {
	Target string
	Module string
}

func (DelegateCollector) Collect

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

func (DelegateCollector) Describe

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

type NodeCollector

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

func (NodeCollector) Collect

func (n NodeCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (NodeCollector) Describe

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

Describe implements the prometheus.Collector interface.

Jump to

Keyboard shortcuts

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