Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetrics ¶
func NewMetrics() *metrics
Types ¶
type Collector ¶
type Collector interface { Prefix() string Describe() []*Description Collect() Metrics Stop() }
type Description ¶
type Description struct {
// contains filtered or unexported fields
}
func NewDesc ¶
func NewDesc(name, description string, labels []string) *Description
func (*Description) Description ¶
func (d *Description) Description() string
func (*Description) Labels ¶ added in v16.10.0
func (d *Description) Labels() []string
func (*Description) Name ¶
func (d *Description) Name() string
func (*Description) String ¶ added in v16.10.0
func (d *Description) String() string
type Pattern ¶
type Pattern interface { // Name returns the name of the metric this pattern is designated to. Name() string // Match returns whether a map of labels with its label values // match this pattern. Match(labels map[string]string) bool // IsValid returns whether the pattern is valid. IsValid() bool }
func NewPattern ¶
NewPattern creates a new pattern with the given prefix and group name. There has to be an even number of parameter, which is ("label", "labelvalue", "label", "labelvalue" ...). The label value will be interpreted as regular expression.
Click to show internal directories.
Click to hide internal directories.