example

package
v0.19.872 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CancellableSignalType signal.SignalType = "cancellable-signal"

	// CancelCallbackMarker is set by the Cancel callback and can be read via
	// the CancelCallbackInvoked query to verify the callback ran.
	CancelCallbackMarker = "cancel-callback-invoked"
)
View Source
const (
	ControllableSignalType       signal.SignalType = "controllable-signal"
	ControllableSignalUpdateName string            = "complete"
)
View Source
const (
	ExampleSignalType signal.SignalType = "example-signal"
)
View Source
const (
	FailingSignalType signal.SignalType = "failing-signal"
)
View Source
const (
	PanickingSignalType signal.SignalType = "panicking-signal"
)
View Source
const (
	SlowSignalType signal.SignalType = "slow-signal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CancellableSignal added in v0.19.872

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

CancellableSignal blocks in Execute until cancelled and tracks whether its Cancel callback was invoked.

func (*CancellableSignal) Cancel added in v0.19.872

func (c *CancellableSignal) Cancel(ctx workflow.Context) error

func (*CancellableSignal) Execute added in v0.19.872

func (c *CancellableSignal) Execute(ctx workflow.Context) error

func (*CancellableSignal) Type added in v0.19.872

func (*CancellableSignal) Validate added in v0.19.872

func (c *CancellableSignal) Validate(ctx workflow.Context) error

type ControllableSignal added in v0.19.850

type ControllableSignal struct {
	ShouldBlock bool `json:"should_block"`
	// contains filtered or unexported fields
}

func (*ControllableSignal) Execute added in v0.19.850

func (c *ControllableSignal) Execute(ctx workflow.Context) error

func (*ControllableSignal) Type added in v0.19.850

func (*ControllableSignal) Validate added in v0.19.850

func (c *ControllableSignal) Validate(ctx workflow.Context) error

type ExampleSignal

type ExampleSignal struct {
	Arg1 string `json:"arg_1"`
	Arg2 string `json:"arg_2"`
	// contains filtered or unexported fields
}

func (*ExampleSignal) Execute

func (e *ExampleSignal) Execute(ctx workflow.Context) error

func (*ExampleSignal) Type

func (e *ExampleSignal) Type() signal.SignalType

func (*ExampleSignal) Validate

func (e *ExampleSignal) Validate(ctx workflow.Context) error

type FailingSignal added in v0.19.872

type FailingSignal struct {
	Reason string `json:"reason"`
}

FailingSignal is a test signal whose Execute always returns an error.

func (*FailingSignal) Execute added in v0.19.872

func (f *FailingSignal) Execute(ctx workflow.Context) error

func (*FailingSignal) Type added in v0.19.872

func (f *FailingSignal) Type() signal.SignalType

func (*FailingSignal) Validate added in v0.19.872

func (f *FailingSignal) Validate(ctx workflow.Context) error

type PanickingSignal added in v0.19.872

type PanickingSignal struct {
	Message string `json:"message"`
}

PanickingSignal is a test signal whose Execute always panics.

func (*PanickingSignal) Execute added in v0.19.872

func (p *PanickingSignal) Execute(ctx workflow.Context) error

func (*PanickingSignal) Type added in v0.19.872

func (p *PanickingSignal) Type() signal.SignalType

func (*PanickingSignal) Validate added in v0.19.872

func (p *PanickingSignal) Validate(ctx workflow.Context) error

type SlowSignal added in v0.19.872

type SlowSignal struct{}

SlowSignal is a test signal that blocks in Execute until the context is canceled.

func (*SlowSignal) Execute added in v0.19.872

func (s *SlowSignal) Execute(ctx workflow.Context) error

func (*SlowSignal) Type added in v0.19.872

func (s *SlowSignal) Type() signal.SignalType

func (*SlowSignal) Validate added in v0.19.872

func (s *SlowSignal) Validate(ctx workflow.Context) error

Jump to

Keyboard shortcuts

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