Documentation ¶
Index ¶
- type BooleanFinder
- type OffsetFinder
- type OffsetRemover
- type ProxyStorage
- func (p *ProxyStorage) Appender() (storage.Appender, error)
- func (p *ProxyStorage) ApplyConfig(c *proxyconfig.Config) error
- func (p *ProxyStorage) Close() error
- func (p *ProxyStorage) GetState() *proxyStorageState
- func (p *ProxyStorage) NodeReplacer(ctx context.Context, s *promql.EvalStmt, node promql.Node) (promql.Node, error)
- func (p *ProxyStorage) ProxyHandler(w http.ResponseWriter, r *http.Request)
- func (p *ProxyStorage) Querier(ctx context.Context, mint, maxt int64) (storage.Querier, error)
- func (p *ProxyStorage) StartTime() (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooleanFinder ¶
Use given func to determine if something is in there or notret := &promql.VectorSelector{Offset: offset}
type OffsetFinder ¶
type OffsetRemover ¶
type OffsetRemover struct{}
When we send the queries below, we want to actually *remove* the offset.
type ProxyStorage ¶
type ProxyStorage struct {
// contains filtered or unexported fields
}
TODO: rename?
func NewProxyStorage ¶
func NewProxyStorage() (*ProxyStorage, error)
func (*ProxyStorage) Appender ¶ added in v0.0.2
func (p *ProxyStorage) Appender() (storage.Appender, error)
func (*ProxyStorage) ApplyConfig ¶
func (p *ProxyStorage) ApplyConfig(c *proxyconfig.Config) error
func (*ProxyStorage) Close ¶ added in v0.0.2
func (p *ProxyStorage) Close() error
TODO: actually close things?
func (*ProxyStorage) GetState ¶
func (p *ProxyStorage) GetState() *proxyStorageState
func (*ProxyStorage) NodeReplacer ¶
func (p *ProxyStorage) NodeReplacer(ctx context.Context, s *promql.EvalStmt, node promql.Node) (promql.Node, error)
This replaces promql Nodes with more efficient-to-fetch ones. This works by taking lower-layer chunks of the query, farming them out to prometheus hosts, then stitching the results back together. An example would be a sum, we can sum multiple sums and come up with the same result -- so we do. There are a few ground rules for this:
- Children cannot be AggregateExpr: aggregates have their own combining logic, so its not safe to send a subquery with additional aggregations
- offsets within the subtree must match: if they don't then we'll get mismatched data, so we wait until we are far enough down the tree that they converge
- Don't reduce accuracy/granularity: the intention of this is to get the correct data faster, meaning correctness overrules speed.
func (*ProxyStorage) ProxyHandler ¶
func (p *ProxyStorage) ProxyHandler(w http.ResponseWriter, r *http.Request)
Handler to proxy requests to *a* server in serverGroups
func (*ProxyStorage) StartTime ¶ added in v0.0.2
func (p *ProxyStorage) StartTime() (int64, error)
Click to show internal directories.
Click to hide internal directories.