Documentation ¶
Index ¶
- Constants
- type DefaultMetricsReader
- func (dmr *DefaultMetricsReader) AddQueryExpr(queryExpr QueryExpr) uint64
- func (dmr *DefaultMetricsReader) Close()
- func (dmr *DefaultMetricsReader) GetQueryResult(id uint64) QueryResult
- func (dmr *DefaultMetricsReader) RemoveQueryExpr(id uint64)
- func (dmr *DefaultMetricsReader) Start(ctx context.Context)
- type MetricsReader
- type PromInfoFetcher
- type QueryExpr
- type QueryResult
Constants ¶
View Source
const (
LabelNameInstance = "instance"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultMetricsReader ¶
func NewDefaultMetricsReader ¶
func NewDefaultMetricsReader(lg *zap.Logger, promFetcher PromInfoFetcher, cfg *config.HealthCheck) *DefaultMetricsReader
func (*DefaultMetricsReader) AddQueryExpr ¶
func (dmr *DefaultMetricsReader) AddQueryExpr(queryExpr QueryExpr) uint64
func (*DefaultMetricsReader) Close ¶
func (dmr *DefaultMetricsReader) Close()
func (*DefaultMetricsReader) GetQueryResult ¶
func (dmr *DefaultMetricsReader) GetQueryResult(id uint64) QueryResult
func (*DefaultMetricsReader) RemoveQueryExpr ¶
func (dmr *DefaultMetricsReader) RemoveQueryExpr(id uint64)
func (*DefaultMetricsReader) Start ¶
func (dmr *DefaultMetricsReader) Start(ctx context.Context)
type MetricsReader ¶
type PromInfoFetcher ¶
type PromInfoFetcher interface {
GetPromInfo(ctx context.Context) (*infosync.PrometheusInfo, error)
}
type QueryResult ¶
func (QueryResult) Empty ¶
func (qr QueryResult) Empty() bool
func (QueryResult) GetSample4Backend ¶
func (qr QueryResult) GetSample4Backend(backend policy.BackendCtx) *model.Sample
GetSample4Backend returns metric of a backend from a vector.
func (QueryResult) GetSamplePair4Backend ¶
func (qr QueryResult) GetSamplePair4Backend(backend policy.BackendCtx) []model.SamplePair
GetSamplePair4Backend returns metric of a backend from a matrix.
Click to show internal directories.
Click to hide internal directories.