package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

CreateBudgetFactoryConfig creates new config using system defaults set by environment variables.
GenerateRandomizedSpans generates n non-overlapping spans.
GenerateRandomizedTs generates a timestamp between 1 and ns nanoseconds.
MemUsage estimates the total memory usage of the event, including its underlying data.
NewBudgetFactory creates a factory callback that would create RangeFeed memory budget according to system policy.
NewCatchUpIterator returns a CatchUpIterator for the given Reader over the given key/time span.
NewFeedBudget creates a FeedBudget to be used with RangeFeed.
NewFeedBudgetMetrics creates new metrics for RangeFeed budgets.
NewMetrics makes the metrics for RangeFeeds monitoring.
NewProcessor creates a new rangefeed Processor.
NewScheduledProcessor creates a new scheduler based rangefeed Processor.
NewScheduler will instantiate an idle scheduler based on provided config.
NewSchedulerMetrics creates metric struct for Scheduler.
NewSeparatedIntentScanner returns an IntentScanner appropriate for use when the separated intents migration has completed.

# Constants

EventQueued is scheduled when event is put into rangefeed queue for processing.
PushTxnQueued is scheduled externally on ranges to push transaction with intents that block resolved timestamp advancing.
Queued is an internal event type that indicate that there's already a pending work for processor and it is already scheduled for execution.
RequestQueued is scheduled when request closure is put into rangefeed request queue.
Stopped is an event that indicates that there would be no more events scheduled for the processor.

# Variables

DefaultPushTxnsInterval is the default interval at which a Processor will push all transactions in the unresolvedIntentQueue that are above the age specified by PushTxnsAge.
TODO(erikgrinaker): remove this once we're confident it won't fire.
PushTxnsBarrierEnabled is an escape hatch to disable the txn push barrier command in case it causes unexpected problems.
PushTxnsEnabled can be used to disable rangefeed txn pushes, typically to temporarily alleviate contention.
RangefeedBudgetsEnabled is a cluster setting that enables rangefeed memory budgets.

# Structs

BudgetFactory creates memory budget for rangefeed according to system settings.
BudgetFactoryConfig is a config for a BudgetFactory.
BufferedPerRangeEventSink is an implementation of BufferedStream which is similar to PerRangeEventSink but buffers events in BufferedSender before forwarding events to the underlying grpc stream.
BufferedSender is embedded in every rangefeed.BufferedPerRangeEventSink, serving as a helper which buffers events before forwarding events to the underlying gRPC stream.
CatchUpIterator is an iterator for catchup-scans.
ClientScheduler is a wrapper on top of scheduler that could be passed to a processor to be able to register itself with a pre-configured ID, enqueue events and terminate as needed.
Config encompasses the configuration required to create a Processor.
FeedBudget is memory budget for RangeFeed that wraps BoundAccount and provides ability to wait for downstream to release budget and to send individual events that exceed total budget size.
FeedBudgetPoolMetrics holds metrics for RangeFeed budgets for the purpose or registration in a metric registry.
Filter informs the producer of logical operations of the information that a rangefeed Processor is interested in, given its current set of registrations.
Metrics are for production monitoring of RangeFeeds.
PerRangeEventSink is an implementation of Stream which annotates each response with rangeID and streamID.
ScheduledProcessor is an implementation of processor that uses external scheduler to use processing.
Scheduler is a simple scheduler that allows work to be scheduler against number of processors.
SchedulerBatch is a batch of IDs to enqueue.
SchedulerConfig contains configurable scheduler parameters.
SchedulerMetrics for production monitoring of rangefeed Scheduler.
SeparatedIntentScanner is an IntentScanner that scans the lock table keyspace and searches for intents.
ShardMetrics metrics for individual scheduler shard.
SharedBudgetAllocation is a token that is passed around with range events to registrations to maintain RangeFeed memory budget across shared queues.
StreamManager manages one or more streams.
UnbufferedSender is embedded in every rangefeed.PerRangeEventSink, serving as a helper to forward events to the underlying gRPC stream.

# Interfaces

BufferedStream is a Stream that can buffer events before sending them to the underlying Stream.
Disconnector defines an interface for disconnecting a registration.
IntentScanner is used by the ResolvedTSScan to find all intents on a range.
Processor manages a set of rangefeed registrations and handles the routing of logical updates to these registrations.
RangefeedMetricsRecorder is an interface for recording rangefeed metrics.
ServerStreamSender forwards MuxRangefeedEvents from UnbufferedSender to the underlying grpc stream.
Stream is an object capable of transmitting RangeFeedEvents from a server rangefeed to a client.
TxnPusher is capable of pushing transactions to a new timestamp and cleaning up the intents of transactions that are found to be committed.

# Type aliases

Callback is a callback to perform work set by processor.
IntentScannerConstructor is used to construct an IntentScanner.