metrics

package
v0.0.0-...-b16daea Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricTypeStrings = []string{
	"mute_deafen_official",
	"message_create_delete",
	"message_edit",
	"reaction_add_remove",
	"mute_deafen_capture",
	"mute_deafen_worker",
	"invalid_request",
	"official_request",
}

Functions

func PrometheusMetricsServer

func PrometheusMetricsServer(client *redis.Client, nodeID, port string) error

func RecordDiscordRequests

func RecordDiscordRequests(client *redis.Client, requestType EventType, num int64)

Types

type Collector

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

func NewCollector

func NewCollector(client *redis.Client, nodeID string) *Collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type EventType

type EventType int
const (
	MuteDeafenOfficial EventType = iota
	MessageCreateDelete
	MessageEdit
	ReactionAdd
	MuteDeafenCapture
	MuteDeafenWorker
	InvalidRequest
	OfficialRequest //must be the last metric
)

Jump to

Keyboard shortcuts

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