Documentation
¶
Overview ¶
Package queue implements a single-reader, multi-writer distributed queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvanceEpochFunc ¶
type AdvanceEpochFunc func(ctx context.Context, txn transaction.Txn) error
AdvanceEpochFunc is a function that advances the epoch.
type ProcessKeyValueFunc ¶
ProcessKeyValueFunc is a function that processes a mutation.
type Queuer ¶
type Queuer interface {
// Enqueue submits a key, value pair for processing.
// Duplicate key, value pairs will be processed in the order received by
// the queue. Mutations SHOULD explicitly reference any data they modify
// to be robust across epoch updates.
Enqueue(key, value []byte) error
// Commit all enqueued items to the sparse merkle tree.
AdvanceEpoch() error
// StartReceiving starts receiving queue enqueued items.
StartReceiving(processFunc ProcessKeyValueFunc, advanceFunc AdvanceEpochFunc) (Receiver, error)
}
Queuer submits new mutations to be processed.
Click to show internal directories.
Click to hide internal directories.