temporal

package
v0.19.934 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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]

func (*CancelBroker[Message]) Join

func (b *CancelBroker[Message]) Join(pctx workflow.Context, match func(Message) bool) workflow.Context

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
}

func New

func New(params Params) Client

type Params

type Params struct {
	fx.In

	L  *zap.Logger
	MW metrics.Writer
	V  *validator.Validate
}

Jump to

Keyboard shortcuts

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