Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.11.0
type Config struct { HTTPClientConfig http_util.ClientConfig `yaml:"http_config"` EndpointsConfig http_util.EndpointsConfig `yaml:",inline"` }
func BuildQueryConfig ¶ added in v0.12.0
BuildQueryConfig returns a query client configuration from a static address.
func DefaultConfig ¶ added in v0.11.0
func DefaultConfig() Config
func LoadConfigs ¶ added in v0.11.0
LoadConfigs loads a list of Config from YAML data.
func (*Config) UnmarshalYAML ¶ added in v0.11.0
UnmarshalYAML implements the yaml.Unmarshaler interface.
type QueryableCreator ¶
type QueryableCreator func(deduplicate bool, replicaLabels []string, maxResolutionMillis int64, partialResponse, skipChunks bool) storage.Queryable
QueryableCreator returns implementation of promql.Queryable that fetches data from the proxy store API endpoints. If deduplication is enabled, all data retrieved from it will be deduplicated along all replicaLabels by default. When the replicaLabels argument is not empty it overwrites the global replicaLabels flag. This allows specifying replicaLabels at query time. maxResolutionMillis controls downsampling resolution that is allowed (specified in milliseconds). partialResponse controls `partialResponseDisabled` option of StoreAPI and partial response behaviour of proxy.
func NewQueryableCreator ¶
func NewQueryableCreator(logger log.Logger, proxy storepb.StoreServer) QueryableCreator
NewQueryableCreator creates QueryableCreator.
type StoreSet ¶
type StoreSet struct {
// contains filtered or unexported fields
}
StoreSet maintains a set of active stores. It is backed up by Store Specifications that are dynamically fetched on every Update() call.
func NewStoreSet ¶
func NewStoreSet( logger log.Logger, reg *prometheus.Registry, storeSpecs func() []StoreSpec, dialOpts []grpc.DialOption, unhealthyStoreTimeout time.Duration, ) *StoreSet
NewStoreSet returns a new set of stores from cluster peers and statically configured ones.
func (*StoreSet) GetStoreStatus ¶ added in v0.2.1
func (s *StoreSet) GetStoreStatus() []StoreStatus
type StoreSpec ¶
type StoreSpec interface { // Addr returns StoreAPI Address for the store spec. It is used as ID for store. Addr() string // Metadata returns current labels, store type and min, max ranges for store. // It can change for every call for this method. // If metadata call fails we assume that store is no longer accessible and we should not use it. // NOTE: It is implementation responsibility to retry until context timeout, but a caller responsibility to manage // given store connection. Metadata(ctx context.Context, client storepb.StoreClient) (labelSets []storepb.LabelSet, mint int64, maxt int64, storeType component.StoreAPI, err error) // StrictStatic returns true if the StoreAPI has been statically defined and it is under a strict mode. StrictStatic() bool }
func NewGRPCStoreSpec ¶
NewGRPCStoreSpec creates store pure gRPC spec. It uses Info gRPC call to get Metadata.