queue

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockQueue

type MockQueue struct {
	mock.Mock
}

MockQueue is a mockable queue.

func (*MockQueue) QueueAdd

func (m *MockQueue) QueueAdd(tx *types.DepositTransaction) error

func (*MockQueue) QueuePool

func (m *MockQueue) QueuePool() (<-chan *types.DepositTransaction, error)

type Queue

type Queue interface {
	// QueueAdd inserts the element to this queue. If element already exists in a queue, it should
	// return nil.
	QueueAdd(tx *types.DepositTransaction) error
	// QueuePool return the queue as a read-only channel.
	QueuePool() (<-chan *types.DepositTransaction, error)
}

Queue implements transactions queue. The queue must not allow duplicates (including history) or must implement deduplication interval so it should not allow duplicate entries for 5 minutes since the first entry with the same ID was added. This is a critical requirement! Otherwise ETH/BTC may be sent twice to Tomochain account. If you don't know what to do, use default AWS SQS FIFO queue or DB queue.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL