Documentation ¶
Overview ¶
Package api implements the transaction scheduler algorithm API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler interface { // Name is the scheduler algorithm name. Name() string // QueueTx queues a transaction for scheduling. QueueTx(tx []byte) error // AppendTxBatch appends a transaction batch for scheduling. // // Note: the AppendTxBatch is not required to be atomic. Semantics depend // on the specific scheduler implementation. AppendTxBatch(batch [][]byte) error // RemoveTxBatch removes a transaction batch. RemoveTxBatch(tx [][]byte) error // GetBatch returns a batch of scheduled transactions (if any is available). GetBatch(force bool) [][]byte // UnscheduledSize returns number of unscheduled items. UnscheduledSize() uint64 // IsQueued returns if a transaction is queued. IsQueued(hash.Hash) bool // UpdateParameters updates the scheduling parameters. UpdateParameters(registry.TxnSchedulerParameters) error // Clear clears the transaction queue. Clear() }
Scheduler defines an algorithm for scheduling incoming transactions.
Click to show internal directories.
Click to hide internal directories.