deucalion

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package deucalion provides an easy-to-use Prometheus metrics server.

The deucalion package provides an automatic Prometheus server that will start automatically when the PROMETHEUS_ADDRESS environment variable is set. To use the deucalion package only for the automatic metrics server, you may import it as:

import _ "github.com/hemilabs/heminetwork/service/deucalion"

After being imported, the application may be run with the PROMETHEUS_ADDRESS environment variable set to an address to start the Prometheus metrics server:

PROMETHEUS_ADDRESS=localhost:2112 myapp

The deucalion package may also be used to create a Prometheus metrics server with custom collectors:

d, _ := deucalion.New(&deucalion.Config{
    ListenAddress: PrometheusListenAddress,
})

_ = d.Run(ctx, []prometheus.Collector{})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewDefaultConfig

func NewDefaultConfig() *Config

type Deucalion

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

func New

func New(cfg *Config) (*Deucalion, error)

func (*Deucalion) Run

func (d *Deucalion) Run(ctx context.Context, cs []prometheus.Collector) error

Jump to

Keyboard shortcuts

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