Documentation ¶
Index ¶
- func Listen()
- func PublishEvent[TEvent any](ctx context.Context, event TEvent) error
- func PublishEventAsync[TEvent any](ctx context.Context, event TEvent) error
- func RegisterCommandBehavior(order int, behavior IBehavior) error
- func RegisterCommandHandler[TCommand any, TResponse any](handler ICommandHandler[TCommand, TResponse]) error
- func RegisterEventSubscriber[TEvent any](handler IEventHandler[TEvent]) error
- func RegisterEventSubscribers[TEvent any](handlers ...IEventHandler[TEvent]) error
- func RegisterQueryBehavior(order int, behavior IBehavior) error
- func RegisterQueryHandler[TQuery any, TResponse any](handler IQueryHandler[TQuery, TResponse]) error
- func Request[TQuery any, TResponse any](ctx context.Context, query TQuery) (TResponse, error)
- func Send[TCommand any, TResponse any](ctx context.Context, command TCommand) (TResponse, error)
- type EventDelivery
- type IBehavior
- type ICommandHandler
- type IEventHandler
- type INotifiable
- type IQueryHandler
- type NextFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishEventAsync ¶
func RegisterCommandBehavior ¶
func RegisterCommandHandler ¶
func RegisterCommandHandler[TCommand any, TResponse any](handler ICommandHandler[TCommand, TResponse]) error
func RegisterEventSubscriber ¶
func RegisterEventSubscriber[TEvent any](handler IEventHandler[TEvent]) error
func RegisterEventSubscribers ¶
func RegisterEventSubscribers[TEvent any](handlers ...IEventHandler[TEvent]) error
func RegisterQueryBehavior ¶
func RegisterQueryHandler ¶
func RegisterQueryHandler[TQuery any, TResponse any](handler IQueryHandler[TQuery, TResponse]) error
Types ¶
type EventDelivery ¶
type EventDelivery struct {
// contains filtered or unexported fields
}
type ICommandHandler ¶
type IEventHandler ¶
type INotifiable ¶
type INotifiable interface { AddEvent(event interface{}) ClearEvents() GetEvents() []interface{} }
type IQueryHandler ¶
Click to show internal directories.
Click to hide internal directories.