Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockQueue ¶
MockQueue is a mockable queue.
func (*MockQueue) QueueAdd ¶
func (m *MockQueue) QueueAdd(tx Transaction) error
func (*MockQueue) QueuePool ¶
func (m *MockQueue) QueuePool() (*Transaction, 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 Transaction) error // QueuePool receives and removes the head of this queue. Returns nil if no elements found. QueuePool() (*Transaction, 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 Stellar account. If you don't know what to do, use default AWS SQS FIFO queue or DB queue.
type SQSFiFo ¶
type SQSFiFo struct{}
func (*SQSFiFo) Add ¶
func (s *SQSFiFo) Add(tx Transaction) error
func (*SQSFiFo) Pool ¶
func (s *SQSFiFo) Pool() (*Transaction, error)
type Transaction ¶
type Transaction struct { TransactionID string AssetCode AssetCode // CRITICAL REQUIREMENT: Amount in the base unit of currency. // For 10 satoshi this should be equal 0.0000001 // For 1 BTC this should be equal 1.0000000 // For 1 Finney this should be equal 0.0010000 // For 1 ETH this should be equal 1.0000000 // Currently, the length of Amount string shouldn't be longer than 17 characters. Amount string StellarPublicKey string }
Click to show internal directories.
Click to hide internal directories.