Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { BufferSize int GetRecords GetRecordsIteratorFunc ConsumeRecord ConsumeRecordFunc Subscribe SubscribeFunc Unsubscribe SubscribeFunc Ctx context.Context }
Config defines a record subscription configuration.
func AggregateTypesConfig ¶
func AggregateTypesConfig(ctx context.Context, store rangedb.Store, broadcaster broadcast.Broadcaster, bufferLength int, aggregateTypes []string, consumeRecord ConsumeRecordFunc) Config
AggregateTypesConfig returns a configuration to subscribe to events by aggregate types.
func AllEventsConfig ¶
func AllEventsConfig(ctx context.Context, store rangedb.Store, broadcaster broadcast.Broadcaster, bufferLength int, consumeRecord ConsumeRecordFunc) Config
AllEventsConfig returns a configuration to subscribe to all events.
type ConsumeRecordFunc ¶
ConsumeRecordFunc defines a function to receiver a rangedb.Record
type GetRecordsIteratorFunc ¶
type GetRecordsIteratorFunc func(globalSequenceNumber uint64) rangedb.RecordIterator
GetRecordsIteratorFunc defines a function to get events from a rangedb.Store. Typically from store.Events or store.Events store.EventsByAggregateTypes.
type SubscribeFunc ¶
type SubscribeFunc func(subscriber broadcast.RecordSubscriber)
SubscribeFunc defines a function to receive a record subscriber
Click to show internal directories.
Click to hide internal directories.