Documentation
¶
Overview ¶
Package integration provides engine components that orchestrate the execution of integration message handlers.
Index ¶
- type CommandPump
- func (p *CommandPump) AcquireDelivery(ctx context.Context, tx *sql.Tx) (messagepump.Delivery, bool, error)
- func (p *CommandPump) HandleDelivery(ctx context.Context, tx *sql.Tx, delivery messagepump.Delivery, ...) error
- func (p *CommandPump) PostponeDelivery(ctx context.Context, tx *sql.Tx, delivery messagepump.Delivery, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandPump ¶
type CommandPump struct {
DB *sql.DB
Handler dogma.IntegrationMessageHandler
Identity *identitypb.Identity
Concurrency dogma.ConcurrencyPreference
Packer *envelopepb.Packer
CommandTypeIDs *uuidpb.Set
OutboundMessageTypes map[reflect.Type]struct{}
}
CommandPump is a messagepump.Driver that delivers pending commands to an integration message handler of a specific type.
func (*CommandPump) AcquireDelivery ¶
func (p *CommandPump) AcquireDelivery(ctx context.Context, tx *sql.Tx) (messagepump.Delivery, bool, error)
AcquireDelivery attempts to acquire the next pending command for an integration handler of one of the configured types.
func (*CommandPump) HandleDelivery ¶
func (p *CommandPump) HandleDelivery( ctx context.Context, tx *sql.Tx, delivery messagepump.Delivery, envelope *envelopepb.Envelope, logger *slog.Logger, ) error
HandleDelivery dispatches a command to the integration handler.
func (*CommandPump) PostponeDelivery ¶
func (p *CommandPump) PostponeDelivery( ctx context.Context, tx *sql.Tx, delivery messagepump.Delivery, delay time.Duration, ) error
PostponeDelivery reschedules the command for redelivery after delay.
Click to show internal directories.
Click to hide internal directories.