Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRecorder ¶
type BaseRecorder struct {
// contains filtered or unexported fields
}
BaseRecorder is a trait that implements the common functionality for the Recorder interface. This object can be safely shared by multiple goroutines.
func (*BaseRecorder) Changes ¶
func (b *BaseRecorder) Changes() []Event
Changes retrieves the list of event tracked so far.
func (*BaseRecorder) ClearChanges ¶
func (b *BaseRecorder) ClearChanges()
ClearChanges clears the list of recorded events.
func (*BaseRecorder) Record ¶
func (b *BaseRecorder) Record(event Event)
Record tracks an event in the list of events.
type Event ¶
type Event interface{}
Event represents the common interface for all domain events.
An event represents something that took place in the domain. They are always named with a past-participle verb, such as "OrderConfirmed". It's not unusual, but not required, for an event to name an aggregate or entity that it relates to.
Since an event represents something in the past, it can be considered a statement of fact and used to take decisions in other parts of the system.
type Recorder ¶
type Recorder interface { // Record tracks an event in the list of events. Record(event Event) // Changes retrieves the list of event tracked so far. Changes() []Event // ClearChanges clears the list of recorded events. ClearChanges() }
Recorder defines an element capable of recording events.
Directories
¶
Path | Synopsis |
---|---|
Package dispatcher provides a simple mechanism for dispatching domain events locally using a simple in-memory broker.
|
Package dispatcher provides a simple mechanism for dispatching domain events locally using a simple in-memory broker. |
Package drain implements a composable message distribution package for Go.
|
Package drain implements a composable message distribution package for Go. |