Documentation
¶
Index ¶
- Variables
- func Iterate(ctx context.Context, m StoreManager, fluxVersion core.Version, filter Filter) iter.Seq2[*Event, error]
- type Event
- type EventOutOfOrderError
- type Filter
- type MessageBus
- type Metadata
- type StoreId
- type StoreIterator
- type StoreManager
- type SubStore
- type UnsubscribeFunc
- type Unsubscriber
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStoreNotFound = errors.New("store not found") ErrEventExists = errors.New("event already exists") )
Functions ¶
Types ¶
type EventOutOfOrderError ¶
func (*EventOutOfOrderError) Error ¶
func (e *EventOutOfOrderError) Error() string
type MessageBus ¶
type StoreIterator ¶
type StoreManager ¶
type StoreManager interface {
List(metadata Metadata) iter.Seq[SubStore]
Create(id StoreId, metadata Metadata) (SubStore, error)
Get(id StoreId) (SubStore, error)
// OnCommit registers a callback that will be called after events have been committed to the store.
// If events are committed in a transaction, the callback will be called after the transaction has been committed.
// If a shared storage is used, it could be that the handler is called with nil values. E.g. when two processes are using a
// shared postgres database, the handler will be called with nil values for the SubStore and events, in the process that did not
// commit the events.
OnCommit(handler func(SubStore, []Event)) Unsubscriber
All(fluxVersion core.Version, filter Filter) (iter.Seq[Event], error)
}
type UnsubscribeFunc ¶
type UnsubscribeFunc func() error
func (UnsubscribeFunc) Unsubscribe ¶
func (u UnsubscribeFunc) Unsubscribe() error
type Unsubscriber ¶
type Unsubscriber interface {
Unsubscribe() error
}
Click to show internal directories.
Click to hide internal directories.