Documentation
¶
Overview ¶
Package requestscoped implements features that rely on HTTP request headers, like applying tenant limitation, per-request limit of evaluated points/series, ...
Index ¶
- Variables
- type MutableLabelDetector
- type Options
- type Store
- func (store *Store) Appender(ctx context.Context) storage.Appender
- func (store *Store) ChunkQuerier(mint, maxt int64) (storage.ChunkQuerier, error)
- func (store *Store) ContextWithRequest(ctx context.Context, r *http.Request, operationName string) (context.Context, types.DebugLevel, error)
- func (store *Store) DebugAll() bool
- func (store *Store) Querier(mint, maxt int64) (storage.Querier, error)
- func (store *Store) ToggleDebug() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParseTTLHeader = errors.New("can't parse time to live header") ErrMissingTenantHeader = errors.New("the tenant header is missing") ErrInconsistentContext = errors.New("assertion failed, different context used in same Querier") ErrAssertion = errors.New("assertion error") ErrNoContextValue = errors.New("assertion error: missing call to ContextWithRequest") )
Functions ¶
This section is empty.
Types ¶
type MutableLabelDetector ¶
type Options ¶
type Options struct {
DefaultMaxEvaluatedSeries uint32
DefaultMaxEvaluatedPoints uint64
DefaultTTL int64
TenantLabelName string
RequireTenantHeader bool
Queryable types.QueryableWithOptions
Appendable types.AppendableWithOptions
MutableLabelDetector MutableLabelDetector
OptionsParser types.HTTPOptionsParser
MetricRegistry prometheus.Registerer
}
type Store ¶
type Store struct {
Options
// contains filtered or unexported fields
}
func NewStore ¶
NewStore return a store (Appendable + Queryable) that handle per HTTP request configuration and limits (tenant labels, maximum evaluated points/series, maximum concurrency, ...).
func (*Store) ChunkQuerier ¶
func (store *Store) ChunkQuerier(mint, maxt int64) (storage.ChunkQuerier, error)
func (*Store) ContextWithRequest ¶
func (store *Store) ContextWithRequest( ctx context.Context, r *http.Request, operationName string, ) (context.Context, types.DebugLevel, error)
ContextWithRequest add to the context the necessary value for Store to work. Any context provided to a function of the Store (Querier().Select(), Appender(), ...) must be a context from ContextWithRequest().
func (*Store) ToggleDebug ¶
Click to show internal directories.
Click to hide internal directories.