Documentation
¶
Index ¶
Constants ¶
View Source
const RequestBufferSize = 1 << 17
RequestBufferSize is the amount of requests users can dispatch that haven't been processed yet before dispatching new ones would start blocking.
View Source
const SkipBatchContextKey contextKey = "skip_batch"
SkipBatchContextKey existence on a context will eliminate the request batching
Variables ¶
This section is empty.
Functions ¶
func NopExecutor ¶
func NopExecutor() *nonBatchingExecutor
Types ¶
type BatchTracker ¶ added in v0.40.0
type BatchTracker interface {
// Batched is called when a request is added to an existing batch.
Batched()
}
type ConditionalExecutor ¶ added in v0.70.3
type ConditionalExecutor struct {
// contains filtered or unexported fields
}
ConditionalExecutor will batch requests only if SkipBatchContextKey is not on the context of the batch request.
func NewConditionalExecutor ¶ added in v0.70.3
func NewConditionalExecutor(logger logging.Logger) *ConditionalExecutor
func (*ConditionalExecutor) Run ¶ added in v0.70.3
func (c *ConditionalExecutor) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.