Documentation ¶
Index ¶
- func FromLabelPairs(labelPairs []LabelPair) model.Metric
- func FromMetricsForLabelMatchersRequest(req *MetricsForLabelMatchersRequest) (model.Time, model.Time, [][]*labels.Matcher, error)
- func FromMetricsForLabelMatchersResponse(resp *MetricsForLabelMatchersResponse) []model.Metric
- func FromQueryRequest(req *QueryRequest) (model.Time, model.Time, []*labels.Matcher, error)
- func FromQueryResponse(resp *QueryResponse) model.Matrix
- func FromWriteRequest(req *WriteRequest) []model.Sample
- type Config
- type Factory
- type Pool
- type PoolConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromLabelPairs ¶
FromLabelPairs unpack a []LabelPair to a model.Metric
func FromMetricsForLabelMatchersRequest ¶
func FromMetricsForLabelMatchersRequest(req *MetricsForLabelMatchersRequest) (model.Time, model.Time, [][]*labels.Matcher, error)
FromMetricsForLabelMatchersRequest unpacks a MetricsForLabelMatchersRequest proto
func FromMetricsForLabelMatchersResponse ¶
FromMetricsForLabelMatchersResponse unpacks a MetricsForLabelMatchersResponse proto
func FromQueryRequest ¶
FromQueryRequest unpacks a QueryRequest proto.
func FromQueryResponse ¶
FromQueryResponse unpacks a QueryResponse proto.
func FromWriteRequest ¶
FromWriteRequest converts a WriteRequest proto into an array of samples.
Types ¶
type Config ¶
type Config struct { MaxRecvMsgSize int CompressToIngester bool // contains filtered or unexported fields }
Config is the configuration struct for the ingester client
func (*Config) RegisterFlags ¶
RegisterFlags registers configuration settings used by the ingester client config
type Factory ¶
type Factory func(addr string) (grpc_health_v1.HealthClient, error)
Factory defines the signature for an ingester client factory.
type Pool ¶
Pool holds a cache of grpc_health_v1 clients.
func (*Pool) GetClientFor ¶
func (p *Pool) GetClientFor(addr string) (grpc_health_v1.HealthClient, error)
GetClientFor gets the client for the specified address. If it does not exist it will make a new client at that address
func (*Pool) RegisteredAddresses ¶
RegisteredAddresses returns all the addresses that a client is cached for
func (*Pool) RemoveClientFor ¶
RemoveClientFor removes the client with the specified address
type PoolConfig ¶
type PoolConfig struct { ClientCleanupPeriod time.Duration HealthCheckIngesters bool RemoteTimeout time.Duration }
PoolConfig is config for creating a Pool.
func (*PoolConfig) RegisterFlags ¶
func (cfg *PoolConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags adds the flags required to config this to the given FlagSet.