common

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MetricsGauges available
	MetricsGauges = make(map[string]*prometheus.GaugeVec)

	// MetricsCounters available
	MetricsCounters = make(map[string]*prometheus.CounterVec)
)
View Source
var DB *sql.DB

DB object used for queries

View Source
var MetricsPort string

MetricsPort metrics are served on

Functions

func ConnectToDB

func ConnectToDB(user, password, address, port, database string) error

ConnectToDB - connect to a MySQL instance

func StartMetrics

func StartMetrics()

StartMetrics initializes and handles metrics Prometheus endpoint This function is safe to call multiple times - it will only start the server once

func StopMetrics added in v0.0.44

func StopMetrics()

StopMetrics gracefully shuts down the metrics server

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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