discoveryutils

package
v1.35.0-cluster Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 45

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinHostPort

func JoinHostPort(host string, port int) string

JoinHostPort returns host:port.

Host may be dns name, ipv4 or ipv6 address.

func SanitizeLabelName

func SanitizeLabelName(name string) string

SanitizeLabelName replaces anything that doesn't match client_label.LabelNameRE with an underscore.

This has been copied from Prometheus sources at util/strutil/strconv.go

Types

type SortedLabels

type SortedLabels []prompbmarshal.Label

SortedLabels represents sorted labels.

func GetSortedLabels

func GetSortedLabels(m map[string]string) SortedLabels

GetSortedLabels returns SortedLabels built from m.

func (*SortedLabels) UnmarshalJSON

func (sls *SortedLabels) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON from data.

Jump to

Keyboard shortcuts

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