metric

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Namespace is the Prometheus metric namespace variable.
	Namespace = "urlshortener"
)

Variables

This section is empty.

Functions

func ReportDbStatus

func ReportDbStatus(db *gorm.DB, dbName string)

ReportDbStatus reports status of database connection to the Prometheus.

func ReportRedisStatus

func ReportRedisStatus(cmdable redis.Cmdable, redisName string)

ReportRedisStatus reports status of redis connection to the Prometheus.

Types

type Metrics

type Metrics struct {
	DbConnectionStatus    *prometheus.GaugeVec
	RedisConnectionStatus *prometheus.GaugeVec
}

Metrics keeps global Prometheus metrics.

Jump to

Keyboard shortcuts

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