Documentation ¶
Overview ¶
Package orderedmap implements a queue backed by an ordered map.
Index ¶
- type OrderedMap
- func (q *OrderedMap) Add(tx []byte) error
- func (q *OrderedMap) AddBatch(batch [][]byte) error
- func (q *OrderedMap) Clear()
- func (q *OrderedMap) GetBatch() [][]byte
- func (q *OrderedMap) IsQueued(txHash hash.Hash) bool
- func (q *OrderedMap) RemoveBatch(batch [][]byte)
- func (q *OrderedMap) Size() uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderedMap ¶
OrderedMap is a queue backed by an ordered map.
func (*OrderedMap) Add ¶
func (q *OrderedMap) Add(tx []byte) error
Add adds transaction into the queue.
func (*OrderedMap) AddBatch ¶
func (q *OrderedMap) AddBatch(batch [][]byte) error
AddBatch adds a batch of transactions into the queue.
func (*OrderedMap) GetBatch ¶
func (q *OrderedMap) GetBatch() [][]byte
GetBatch gets a batch of transactions from the queue.
func (*OrderedMap) IsQueued ¶
func (q *OrderedMap) IsQueued(txHash hash.Hash) bool
IsQueued checks if a transactions is already queued.
func (*OrderedMap) RemoveBatch ¶
func (q *OrderedMap) RemoveBatch(batch [][]byte)
RemoveBatch removes a batch of transactions from the queue.
Click to show internal directories.
Click to hide internal directories.