Documentation ¶
Index ¶
- func CanRetryError(err error, delta time.Duration) (time.Duration, bool)
- func IsUnavailableError(err error) bool
- func RegisterMetrics()
- type APIError
- type ConfigResult
- type ConfigSectionGlobal
- type FailoverGroup
- func (fg *FailoverGroup) ClearCache()
- func (fg *FailoverGroup) Config(ctx context.Context) (cfg *ConfigResult, err error)
- func (fg *FailoverGroup) Name() string
- func (fg *FailoverGroup) Query(ctx context.Context, expr string) (qr *QueryResult, err error)
- func (fg *FailoverGroup) RangeQuery(ctx context.Context, expr string, lookback, step time.Duration) (rqr *RangeQueryResult, err error)
- type FailoverGroupError
- type Prometheus
- type PrometheusConfig
- type QueryResult
- type RangeQueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanRetryError ¶ added in v0.13.0
func IsUnavailableError ¶ added in v0.13.0
func RegisterMetrics ¶ added in v0.11.0
func RegisterMetrics()
Types ¶
type ConfigResult ¶ added in v0.14.0
type ConfigResult struct { URI string Config PrometheusConfig }
type ConfigSectionGlobal ¶
type FailoverGroup ¶ added in v0.13.0
type FailoverGroup struct {
// contains filtered or unexported fields
}
func NewFailoverGroup ¶ added in v0.13.0
func NewFailoverGroup(name string, servers []*Prometheus, strictErrors bool) *FailoverGroup
func (*FailoverGroup) ClearCache ¶ added in v0.13.0
func (fg *FailoverGroup) ClearCache()
func (*FailoverGroup) Config ¶ added in v0.13.0
func (fg *FailoverGroup) Config(ctx context.Context) (cfg *ConfigResult, err error)
func (*FailoverGroup) Name ¶ added in v0.13.0
func (fg *FailoverGroup) Name() string
func (*FailoverGroup) Query ¶ added in v0.13.0
func (fg *FailoverGroup) Query(ctx context.Context, expr string) (qr *QueryResult, err error)
func (*FailoverGroup) RangeQuery ¶ added in v0.13.0
func (fg *FailoverGroup) RangeQuery(ctx context.Context, expr string, lookback, step time.Duration) (rqr *RangeQueryResult, err error)
type FailoverGroupError ¶ added in v0.14.0
type FailoverGroupError struct {
// contains filtered or unexported fields
}
func (*FailoverGroupError) Error ¶ added in v0.14.0
func (e *FailoverGroupError) Error() string
func (*FailoverGroupError) IsStrict ¶ added in v0.14.0
func (e *FailoverGroupError) IsStrict() bool
func (*FailoverGroupError) URI ¶ added in v0.14.0
func (e *FailoverGroupError) URI() string
func (*FailoverGroupError) Unwrap ¶ added in v0.14.0
func (e *FailoverGroupError) Unwrap() error
type Prometheus ¶ added in v0.7.0
type Prometheus struct {
// contains filtered or unexported fields
}
func NewPrometheus ¶ added in v0.7.0
func NewPrometheus(name, uri string, timeout time.Duration) *Prometheus
func (*Prometheus) Config ¶ added in v0.7.0
func (p *Prometheus) Config(ctx context.Context) (*ConfigResult, error)
func (*Prometheus) Query ¶ added in v0.7.0
func (p *Prometheus) Query(ctx context.Context, expr string) (*QueryResult, error)
func (*Prometheus) RangeQuery ¶ added in v0.7.0
func (p *Prometheus) RangeQuery(ctx context.Context, expr string, lookback, step time.Duration) (*RangeQueryResult, error)
type PrometheusConfig ¶
type PrometheusConfig struct {
Global ConfigSectionGlobal `yaml:"global"`
}
type QueryResult ¶
type RangeQueryResult ¶
Click to show internal directories.
Click to hide internal directories.