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 ¶
func IntToFloat ¶ added in v0.9.0
func Uint64ToFloat ¶ added in v0.9.0
Types ¶
type Config ¶
type Config struct { ListenAddress string // contains filtered or unexported fields }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
Click to show internal directories.
Click to hide internal directories.