Documentation
¶
Index ¶
Constants ¶
View Source
const CancelChannelName = "cancel-signal"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelBroker ¶
type CancelBroker[Message any] struct { // contains filtered or unexported fields }
func NewCancelBroker ¶
func NewCancelBroker[Message any](pctx workflow.Context) *CancelBroker[Message]
type Client ¶
type Client interface {
// Send sends a signal to an event loop for asynchronous processing.
//
// If knowing when the signal is done processing is a requirement, use SendAndWait or SendAsync.
Send(ctx workflow.Context, id string, signal eventloop.Signal)
// SendFaF sends a signal to an event loop for asynchronous processing.
//
// This method is for fire-and-forget use cases, where completion of signal handling does not matter.
// An error is returned if there was a problem in sending the signal, not in handling it.
//
// If knowing when the signal is done processing is a requirement, use SendAndWait or SendAsync.
SendFaF(ctx workflow.Context, id string, signal eventloop.Signal) error
// SendAsync is the same as Send, but it returns a future that allows you to decide when to
// wait for a result.
//
// Prefer Send for fire-and-forget use cases, as creating the future has some overhead.
//
// The value and error of the returned future will be the return type of the signal handler.
// For signal handlers with only an error return type, a successful return will be nil, nil.
SendAsync(ctx workflow.Context, id string, signal eventloop.Signal) (workflow.Future, error)
// SendAndWait sends a signal to an event loop, then waits for the signal to be processed
// before returning.
//
// It is the same as calling SendAsync and then immediately waiting for the future to complete.
SendAndWait(ctx workflow.Context, id string, signal eventloop.Signal) error
}
Click to show internal directories.
Click to hide internal directories.