Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrFunc ¶
type ErrFunc func(err error)
ErrFunc used by handler to report error from observation
type Event ¶
type Event = interface { Version() uint64 EventType() string AggregateID() string GroupID() string IsSnapshot() bool Timestamp() time.Time ETag() *eventstore.ETagData ServiceID() (string, bool) Types() []string }
Event interface over event created by user.
type EventUnmarshaler ¶
type EventUnmarshaler = interface { Version() uint64 EventType() string AggregateID() string GroupID() string IsSnapshot() bool Timestamp() time.Time Unmarshal(v interface{}) error }
EventUnmarshaler provides event.
type GoroutinePoolGoFunc ¶
type GoroutinePoolGoFunc func(func()) error
GoroutinePoolGoFunc processes actions via provided function
type GoroutinePoolHandler ¶
type GoroutinePoolHandler struct {
// contains filtered or unexported fields
}
GoroutinePoolHandler submit events to goroutine pool for process them.
func NewGoroutinePoolHandler ¶
func NewGoroutinePoolHandler( goroutinePoolGo GoroutinePoolGoFunc, eventsHandler Handler, errFunc ErrFunc, ) *GoroutinePoolHandler
NewGoroutinePoolHandler creates new event processor.
type Iter ¶
type Iter = interface { Next(ctx context.Context) (EventUnmarshaler, bool) Err() error }
Iter provides iterator over events from eventstore or eventbus.
type Publisher ¶
type Publisher interface { Publish(ctx context.Context, topics []string, groupID, aggregateID string, event Event) error GetPublishSubject(owner string, event Event) []string }
Publisher publish event to topics
type Subscriber ¶
type Subscriber interface { Subscribe(ctx context.Context, subscriptionID string, topics []string, eh Handler) (Observer, error) GetResourceEventSubjects(owner string, resourceID *commands.ResourceId, eventType string) []string }
Subscriber creates observation over topics. When subscriptionID is same among more Subscribers events are balanced among them.
Click to show internal directories.
Click to hide internal directories.