Documentation
¶
Index ¶
Constants ¶
View Source
const (
SourceDefault = "application"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseEvent ¶
type BaseEvent struct {
ID string
EventTypeValue string
OccurredAtValue time.Time
AggregateTypeValue string
AggregateIDValue string
}
BaseEvent provides the stable event identity and routing fields.
func NewBaseEvent ¶
func (BaseEvent) AggregateID ¶
func (BaseEvent) AggregateType ¶
func (BaseEvent) OccurredAt ¶
type DomainEvent ¶
type DomainEvent interface {
EventID() string
EventType() string
OccurredAt() time.Time
AggregateType() string
AggregateID() string
Payload() any
}
DomainEvent describes a business fact that can be routed through MQ or staged into the transactional outbox.
type Publisher ¶
type Publisher interface {
Publish(ctx context.Context, event DomainEvent) error
PublishAll(ctx context.Context, events []DomainEvent) error
}
Publisher publishes events to their configured transport.
Click to show internal directories.
Click to hide internal directories.