Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMemoryStorage ¶
func NewMemoryStorage() *memoryStorage
NewMemoryStorage returns storage backed by slice, Item id is an index in slice
func NewProcessFn ¶
NewProcessFn creates new processing function for messages
func NewRWLockedStorage ¶
func NewRWLockedStorage(storage Storage) *rwLockedStorage
NewRWLockedStorage returns storage which adds read/write mutex to upstream storage
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor allows to process incoming messages with given processing function
func NewProcessor ¶
func NewProcessor(messages MessageChan) *Processor
NewProcessor creates new processor
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is responsible for reading ordered from SQS and passing it to messages channel
type Storage ¶
type Storage interface { // AddItem adds Item to storage AddItem(item Item) // RemoveItem removes Item from storage RemoveItem(key string) error // GetItem returns Item with given id from storage GetItem(key string) (*Item, error) // GetAllItems returns items in storage, new slice created every time GetAllItems() []Item // Iterate allows to iterato over ordered in storage, can be used for processing which does not involve blocking IO Iterate(accept func(Item)) }
Storage defines interface for ordered storage
Click to show internal directories.
Click to hide internal directories.