Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHTTPClient ¶ added in v1.35.1
GetHTTPClient returns default client for http API requests.
func SanitizeLabelName ¶
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 Client ¶ added in v1.35.1
type Client struct {
// contains filtered or unexported fields
}
Client is http client, which talks to the given apiServer.
type ConfigMap ¶ added in v1.35.1
type ConfigMap struct {
// contains filtered or unexported fields
}
ConfigMap is a map for storing discovery api configs.
It automatically removes old configs which weren't accessed recently.
func (*ConfigMap) Get ¶ added in v1.35.1
func (cm *ConfigMap) Get(key interface{}, newConfig func() (interface{}, error)) (interface{}, error)
Get returns config for the given key.
Key must be a pointer.
It creates new config map with newConfig() call if cm doesn't contain config under the given key.
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.