prom

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package prom provides Prometheus emulation and translation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(blipDomain string, tr DomainTranslator) error

Types

type API

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

API emulates a Prometheus exporter API. It uses an Exporter to scape metrics when GET /metrics is called.

func NewAPI

func NewAPI(cfg blip.ConfigExporter, monitorId string, exp Exporter) *API

func (*API) Run

func (api *API) Run() error

func (*API) Stop

func (api *API) Stop()

type DomainTranslator

type DomainTranslator interface {
	Translate(values []blip.MetricValue, ch chan<- prometheus.Metric)

	Names() (prefix, domain, shortDomin string)
}

func Translator

func Translator(domain string) DomainTranslator

type Exporter

type Exporter interface {
	Scrape() (string, error)
}

Exporter emulates a Prometheus mysqld_exporter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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