Documentation ¶
Index ¶
- func HumanizeBytes(b int) string
- func HumanizeDuration(d time.Duration) string
- type ConfigSectionGlobal
- type Prometheus
- func (p *Prometheus) ClearCache()
- func (p *Prometheus) Config(ctx context.Context) (*PrometheusConfig, error)
- func (p *Prometheus) Name() string
- func (p *Prometheus) Query(ctx context.Context, expr string) (*QueryResult, error)
- func (p *Prometheus) RangeQuery(ctx context.Context, expr string, start, end time.Time, step time.Duration) (*RangeQueryResult, error)
- type PrometheusConfig
- type QueryResult
- type RangeQueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HumanizeBytes ¶
func HumanizeDuration ¶
Types ¶
type ConfigSectionGlobal ¶
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) ClearCache ¶ added in v0.7.0
func (p *Prometheus) ClearCache()
func (*Prometheus) Config ¶ added in v0.7.0
func (p *Prometheus) Config(ctx context.Context) (*PrometheusConfig, error)
func (*Prometheus) Name ¶ added in v0.7.0
func (p *Prometheus) Name() string
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, start, end time.Time, 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.