Documentation ¶
Index ¶
- Constants
- func LabelsByProfiles(lset labels.Labels, c *config.ProfilingConfig) []labels.Labels
- type Target
- func (t *Target) Clone() *Target
- func (t *Target) DiscoveredLabels() labels.Labels
- func (t *Target) Health() TargetHealth
- func (t *Target) Labels() labels.Labels
- func (t *Target) LastError() error
- func (t *Target) LastScrape() time.Time
- func (t *Target) LastScrapeDuration() time.Duration
- func (t *Target) Params() url.Values
- func (t *Target) SetDiscoveredLabels(l labels.Labels)
- func (t *Target) String() string
- func (t *Target) URL() *url.URL
- type TargetHealth
- type Targets
Constants ¶
View Source
const ( ProfilePath = "__profile_path__" ProfileName = "__name__" ProfileTraceType = "trace" )
Variables ¶
This section is empty.
Functions ¶
func LabelsByProfiles ¶
LabelsByProfiles returns the labels for a given ProfilingConfig.
Types ¶
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target refers to a singular HTTP or HTTPS endpoint.
func (*Target) DiscoveredLabels ¶
DiscoveredLabels returns a copy of the target's labels before any processing.
func (*Target) Health ¶
func (t *Target) Health() TargetHealth
Health returns the last known health state of the target.
func (*Target) LastScrape ¶
LastScrape returns the time of the last scrape.
func (*Target) LastScrapeDuration ¶
LastScrapeDuration returns how long the last scrape of the target took.
func (*Target) SetDiscoveredLabels ¶
SetDiscoveredLabels sets new DiscoveredLabels.
type TargetHealth ¶
type TargetHealth string
TargetHealth describes the health state of a target.
const ( HealthUnknown TargetHealth = "unknown" HealthGood TargetHealth = "up" HealthBad TargetHealth = "down" )
The possible health states of a target based on the last performed scrape.
Click to show internal directories.
Click to hide internal directories.