Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Receipt ¶
type Receipt string
Receipt represents a unique receipt for a record, so that it can be tracked for committing purposes.
type Record ¶
type Record interface { // ID of the record, which is unique to courier ID() uuid.UUID // Body is the payload of the record Body() []byte // RecordID is the potential id from the underlying provider RecordID() string // Receipt is the underlying uniqueness associated with the message Receipt() Receipt // Equal another Record or not Equal(Record) bool // Commit a record to a transaction Commit(Transaction) error // Failed a record to a transaction Failed(Transaction) error }
Record represents a message from the underlying storage.
type Transaction ¶
type Transaction interface { // Push a record id and receipt to a transaction Push(uuid.UUID, Record) error // Walk over the transactions Walk(func(uuid.UUID, Record) error) error // Len returns the number of items with in a transaction Len() int // Flush a transaction Flush() error }
Transaction represents a way of managing statefull actions (commit vs failure)
Click to show internal directories.
Click to hide internal directories.