metrics

package
v0.0.0-...-7308662 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPusher

func InitPusher(ctx context.Context, cfg *PushConfig)

InitPusher creates prometheus pusher and starts goroutine to push metrics.

func ServiceMiddleware

func ServiceMiddleware(name string, service func() int) func() int

ServiceMiddleware executes given service and updates necessary metrics.

Types

type PushConfig

type PushConfig struct {
	Instance string
	URL      string
	Job      string
	Interval time.Duration
}

PushConfig is used to create prometheus pusher.

Jump to

Keyboard shortcuts

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