Documentation ¶
Overview ¶
Package rabbit provides an event and command bus for the CQRS and Event Sourcing framework
Current version: experimental
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Prefetch = 100
Prefetch amount of messages to prefetch
Functions ¶
This section is empty.
Types ¶
type CommandBus ¶
type CommandBus struct {
// contains filtered or unexported fields
}
CommandBus ...
func NewCommandBus ¶
func NewCommandBus(resolver ConnectionStringResolver, name string, exchange string) *CommandBus
NewCommandBus will create a new command bus
func (*CommandBus) PublishCommands ¶
func (bus *CommandBus) PublishCommands(commands []cqrs.Command) error
PublishCommands will publish commands
func (*CommandBus) ReceiveCommands ¶
func (bus *CommandBus) ReceiveCommands(options cqrs.CommandReceiverOptions) error
ReceiveCommands will recieve commands
type ConnectionStringResolver ¶ added in v1.0.0
ConnectionStringResolver is a function that dynamically returns a connection string
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
EventBus ...
func NewEventBus ¶
func NewEventBus(resolver ConnectionStringResolver, name string, exchange string) *EventBus
NewEventBus ...
func (*EventBus) DeleteQueue ¶
DeleteQueue will delete a queue
func (*EventBus) PublishEvents ¶
func (bus *EventBus) PublishEvents(events []cqrs.VersionedEvent) error
PublishEvents will publish events
func (*EventBus) ReceiveEvents ¶
func (bus *EventBus) ReceiveEvents(options cqrs.VersionedEventReceiverOptions) error
ReceiveEvents will receive events
type RawCommand ¶
type RawCommand struct { MessageID string `json:"messageID"` CorrelationID string `json:"correlationID"` CommandType string `json:"commandType"` Created time.Time `json:"time"` Body json.RawMessage }
RawCommand represents an actor intention to alter the state of the system
Click to show internal directories.
Click to hide internal directories.