Documentation
¶
Index ¶
Constants ¶
View Source
const ( GAUGE Kind = 1 CUMULATIVE Kind = 2 DELTA Kind = 3 DOUBLE ValueType = 1 INT64 ValueType = 2 DISTRIBUTION ValueType = 3 HISTOGRAM ValueType = 4 )
View Source
const DefaultEndpointPath = "api/v1/targets/metadata"
DefaultEndpointPath is the default HTTP path on which Prometheus serves the target metadata endpoint.
View Source
const MetricTypeUntyped = "untyped"
The old metric type value for textparse.MetricTypeUnknown that is used in Prometheus 2.4 and earlier.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache populates and maintains a cache of metric metadata it retrieves from a given Prometheus server. Its methods are not safe for concurrent use.
func NewCache ¶
NewCache returns a new cache that gets populated by the metadata endpoint at the given URL. It uses the default endpoint path if no specific path is provided.
Click to show internal directories.
Click to hide internal directories.