Documentation ¶
Overview ¶
Package integration dispatches commands to integration message handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutor ¶
type CommandExecutor struct { ExecuteQueue *messaging.ExchangeQueue[ExecuteRequest, ExecuteResponse] Packer *envelope.Packer }
CommandExecutor is an implementation of dogma.CommandExecutor that dispatches the command to an exchange queue.
func (*CommandExecutor) ExecuteCommand ¶
func (e *CommandExecutor) ExecuteCommand( ctx context.Context, c dogma.Command, _ ...dogma.ExecuteCommandOption, ) error
ExecuteCommand enqueues a command.
type EventRecorder ¶
type EventRecorder interface { AppendEvents(context.Context, eventstream.AppendRequest) (eventstream.AppendResponse, error) SelectEventStream(context.Context) (streamID *uuidpb.UUID, offset eventstream.Offset, err error) }
EventRecorder is an interface for appending events to event streams.
type ExecuteRequest ¶
type ExecuteRequest struct {
Command *envelopepb.Envelope
}
ExecuteRequest is a request to execute a command.
type ExecuteResponse ¶
type ExecuteResponse struct { }
ExecuteResponse is the response to an ExecuteRequest.
type Supervisor ¶
type Supervisor struct { ExecuteQueue messaging.ExchangeQueue[ExecuteRequest, ExecuteResponse] Handler dogma.IntegrationMessageHandler HandlerIdentity *identitypb.Identity Journals journal.BinaryStore Keyspaces kv.BinaryStore Packer *envelope.Packer EventRecorder EventRecorder // contains filtered or unexported fields }
Supervisor dispatches commands to a specific integration message handler.
func (*Supervisor) Run ¶
func (s *Supervisor) Run(ctx context.Context) error
Run starts the supervisor. It runs until ctx is canceled, Shutdown() is called, or an error occurs.
func (*Supervisor) Shutdown ¶
func (s *Supervisor) Shutdown()
Shutdown stops the supervisor when it next becomes idle.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
integrationjournal
Package integrationjournal encapsulates the integration subsystem's use of journal related persistence.
|
Package integrationjournal encapsulates the integration subsystem's use of journal related persistence. |
integrationkv
Package integrationkv encapsulates the integration subsystem's use of key/value related persistence.
|
Package integrationkv encapsulates the integration subsystem's use of key/value related persistence. |
Click to show internal directories.
Click to hide internal directories.