Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer interface { // GetIterator creates an iterator pointing to the given cursor. // ConsumerIterator.Value() will retrieves the given cursor. // If the given Cursor has no|empty CurrentEvent.ID set, the last known consumer's cursor position is used. GetIterator(from *spec.Cursor) (ConsumerIterator, error) // Commit marks the event as successfully handled by the consumer. Commit(cursor *spec.Cursor) error }
Consumer proxies a consumer.
func NewConsumer ¶
func NewConsumer(cursors storage.CursorStorage, events storage.EventStorage) Consumer
NewConsumer ctor.
type ConsumerIterator ¶
type ConsumerIterator interface { io.Closer // Value returns the current cursor or nil if done. Value() (*spec.Cursor, error) // Next moves the iterator to the next cursor position. // It returns false if the iterator is exhausted. Next() bool }
A ConsumerIterator is used to move the consumer's cursor.
func NewIterator ¶
func NewIterator(topic spec.Topic, consumer string, inner storage.EventsIterator, cursors storage.CursorStorage) ConsumerIterator
NewIterator ctor.
Click to show internal directories.
Click to hide internal directories.