models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultScrapeLabel label use to define is the target
	// must be scrape by Prometheus
	DefaultScrapeLabel = "prometheus.io/scrape"
	// DefaultScrapePortLabel label use to define the port
	// of the metrics handler of the target
	DefaultScrapePortLabel = "prometheus.io/port"
	// DefaultScrapeHostLabel label use to define the host
	// of the target
	DefaultScrapeHostLabel = "prometheus.io/host"
	// DefaultScrapePathLabel label use to define the metrics
	// path of the target
	DefaultScrapePathLabel = "prometheus.io/path"
	// DefaultScrapeSchemeLabel label use to define the scheme
	// of the target
	DefaultScrapeSchemeLabel = "prometheus.io/scheme"
)

Functions

This section is empty.

Types

type Group

type Group struct {
	Targets []Target `json:"targets"`
	Labels  Label    `json:"labels"`
	Source  string   `json:"-"`
}

Group Object

type Label

type Label model.LabelSet

Label ...

type Target

type Target struct {
	Name        string
	Host        string
	Port        int
	MetricsPath string
	Scheme      string
	Labels      Label
}

Target Object

func (Target) MarshalJSON

func (t Target) MarshalJSON() ([]byte, error)

MarshalJSON ...

func (Target) MarshalYAML

func (t Target) MarshalYAML() (interface{}, error)

MarshalYAML ...

Jump to

Keyboard shortcuts

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