task

package
v1.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutor

func NewExecutor(
	accounts account.Store,
	chats chat.Store,
	messages messaging.Store,
	requests paymentrequest.Store,
	sender *messaging.Sender,
	ocpData ocp_data.Provider,
	chatEventBus *event.Bus[*commonpb.ChatId, *eventpb.ChatEvent],
) ocp_integration.TaskExecutor

NewExecutor constructs the task executor. messages is the messaging store, written to mark a payment's return offer returned (see sendReturnPaymentMessage); requests is the payment request store, written to mark a share paid by a requested payment, and chatEventBus the chat-keyed event bus the mark is announced on (see recordRequestedPayment).

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor executes Flipcash-defined tasks whose execution is guaranteed by the OCP task system. Tasks are delivered at least once and may execute concurrently on any process, so every handler must be idempotent.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, record *ocp_task.Record) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL