Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBus ¶
type EventBus interface { // Publish sends an event to the underlying message bus. Publish(ctx context.Context, event interface{}) error }
EventBus is a generic event bus.
type EventDispatcher ¶
type EventDispatcher struct {
// contains filtered or unexported fields
}
EventDispatcher dispatches events through the underlying generic event bus.
func NewEventDispatcher ¶
func NewEventDispatcher(bus EventBus) EventDispatcher
NewEventDispatcher returns a new EventDispatcher instance.
func (EventDispatcher) MarkedAsComplete ¶
func (d EventDispatcher) MarkedAsComplete(ctx context.Context, event todo.MarkedAsComplete) error
MarkedAsComplete dispatches a(n) MarkedAsComplete event.
type MarkedAsCompleteEventHandler ¶
type MarkedAsCompleteEventHandler struct {
// contains filtered or unexported fields
}
MarkedAsCompleteEventHandler handles MarkedAsComplete events.
func NewMarkedAsCompleteEventHandler ¶
func NewMarkedAsCompleteEventHandler(handler MarkedAsCompleteHandler, name string) MarkedAsCompleteEventHandler
NewMarkedAsCompleteEventHandler returns a new MarkedAsCompleteEventHandler instance.
func (MarkedAsCompleteEventHandler) Handle ¶
func (h MarkedAsCompleteEventHandler) Handle(ctx context.Context, event interface{}) error
Handle handles an event.
func (MarkedAsCompleteEventHandler) HandlerName ¶
func (h MarkedAsCompleteEventHandler) HandlerName() string
HandlerName returns the name of the event handler.
func (MarkedAsCompleteEventHandler) NewEvent ¶
func (h MarkedAsCompleteEventHandler) NewEvent() interface{}
NewEvent returns a new empty event used for serialization.
type MarkedAsCompleteHandler ¶
type MarkedAsCompleteHandler interface { // MarkedAsComplete handles a(n) MarkedAsComplete event. MarkedAsComplete(ctx context.Context, event todo.MarkedAsComplete) error }
MarkedAsCompleteHandler handles MarkedAsComplete events.
Click to show internal directories.
Click to hide internal directories.