prompush

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	URL    string            `yaml:"url"` // http://PUSHGATEWAY_FQDN/metrics/job/JOB/instance/INSTANCE
	Labels map[string]string `yaml:"labels"`
	Vars   []string          `yaml:"vars"`
	// contains filtered or unexported fields
}

Settings contain the settings and stored metric-values

func (*Settings) GetHandler

func (t *Settings) GetHandler(dryRun bool) (metrics.Target, error)

GetHandler returns the metric.Target for the pushgateway-handler

func (*Settings) Send

func (t *Settings) Send() error

Send sends all metrics collected so far

func (*Settings) Set

func (t *Settings) Set(name string, value interface{}, keys map[string]interface{}) error

Set creates a metric+keys with a value and saves

Jump to

Keyboard shortcuts

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