eventing

package
v0.0.0-...-8dfeaa5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CommandHandleResultProvider string = "eventing.dispatcher"
View Source
const MailCategory string = "event"

Variables

This section is empty.

Functions

func CreateEventMail

func CreateEventMail(data *EventData) messaging.Mail[EventData]

Types

type DefaultEventDispatcher

type DefaultEventDispatcher struct {
	// contains filtered or unexported fields
}

func (*DefaultEventDispatcher) AddProxy

func (ed *DefaultEventDispatcher) AddProxy(proxies ...EventHandlerProxy)

func (*DefaultEventDispatcher) Dispatch

func (ed *DefaultEventDispatcher) Dispatch(data *domain.EventStream)

func (*DefaultEventDispatcher) Initialize

func (*DefaultEventDispatcher) Subscribe

func (ed *DefaultEventDispatcher) Subscribe(eventTypeName string, handler EventHandler)

func (*DefaultEventDispatcher) SubscribeMulti

func (ed *DefaultEventDispatcher) SubscribeMulti(handlerGroup EventHandlerGroup)

type EventBus

type EventBus interface {
	Publish(es domain.EventStream) error
}

type EventData

type EventData struct {
	domain.DomainEvent
	AggregateID   string
	AggregateType string
	StreamVersion int
	CommandID     string
	CommandType   string
	Extensions    map[string]string
}

func (*EventData) SetCustomExtension

func (data *EventData) SetCustomExtension(ctx context.Context, key string, val string)

type EventDispatcher

type EventDispatcher interface {
	Subscribe(eventTypeName string, handler EventHandler)
	SubscribeMulti(handlerGroup EventHandlerGroup)
	AddProxy(proxies ...EventHandlerProxy)
	Dispatch(data *domain.EventStream)
}

type EventHandleFunc

type EventHandleFunc = messaging.MessageHandleFunc[EventData]

type EventHandlerGroup

type EventHandlerGroup interface {
	EventHandlers() map[string]EventHandler
}

type EventProcessor

type EventProcessor interface {
	Start()
	Stop()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL