options

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachOption added in v0.16.0

type AttachOption interface {
	BeforeAttach(*AttachOptions)
}

type AttachOptions added in v0.16.0

type AttachOptions struct {
	Codec encoding.Codec
}

type AwakeableOption

type AwakeableOption interface {
	BeforeAwakeable(*AwakeableOptions)
}

type AwakeableOptions

type AwakeableOptions struct {
	Codec encoding.Codec
}

type ClientOption added in v0.11.0

type ClientOption interface {
	BeforeClient(*ClientOptions)
}

type ClientOptions added in v0.11.0

type ClientOptions struct {
	Codec encoding.Codec
}

type GetOption

type GetOption interface {
	BeforeGet(*GetOptions)
}

type GetOptions

type GetOptions struct {
	Codec encoding.Codec
}

type HandlerOption added in v0.10.0

type HandlerOption interface {
	BeforeHandler(*HandlerOptions)
}

type HandlerOptions added in v0.10.0

type HandlerOptions struct {
	Codec                 encoding.PayloadCodec
	Metadata              map[string]string
	Documentation         string
	AbortTimeout          *time.Duration
	EnableLazyState       *bool
	IdempotencyRetention  *time.Duration
	InactivityTimeout     *time.Duration
	IngressPrivate        *bool
	JournalRetention      *time.Duration
	WorkflowRetention     *time.Duration
	InvocationRetryPolicy *InvocationRetryPolicy
}

type IngressClientOption added in v0.18.0

type IngressClientOption interface {
	BeforeIngress(*IngressClientOptions)
}

type IngressClientOptions added in v0.18.0

type IngressClientOptions struct {
	HttpClient *http.Client
	AuthKey    string
	Codec      encoding.PayloadCodec
}

type IngressRequestOption added in v0.18.0

type IngressRequestOption interface {
	BeforeIngressRequest(*IngressRequestOptions)
}

type IngressRequestOptions added in v0.18.0

type IngressRequestOptions struct {
	RequestOptions
	Codec encoding.PayloadCodec
}

type IngressSendOption added in v0.18.0

type IngressSendOption interface {
	BeforeIngressSend(*IngressSendOptions)
}

type IngressSendOptions added in v0.18.0

type IngressSendOptions struct {
	SendOptions
	Codec encoding.PayloadCodec
}

type InvocationRetryPolicy added in v0.20.0

type InvocationRetryPolicy struct {
	InitialInterval      *time.Duration
	ExponentiationFactor *float64
	MaxInterval          *time.Duration
	MaxAttempts          *int
	OnMaxAttempts        *OnMaxAttempts
}

InvocationRetryPolicy exposed in discovery manifest (protocol v4+) Unset fields inherit server defaults.

type InvocationRetryPolicyOption added in v0.20.0

type InvocationRetryPolicyOption interface {
	BeforeRetryPolicy(*InvocationRetryPolicy)
}

InvocationRetryPolicyOption configures fields of InvocationRetryPolicy.

func InvokeRetryWithExponentiationFactor added in v0.20.0

func InvokeRetryWithExponentiationFactor(f float64) InvocationRetryPolicyOption

func InvokeRetryWithInitialInterval added in v0.20.0

func InvokeRetryWithInitialInterval(d time.Duration) InvocationRetryPolicyOption

Helper constructors to be used by public API

func InvokeRetryWithMaxAttempts added in v0.20.0

func InvokeRetryWithMaxAttempts(n int) InvocationRetryPolicyOption

func InvokeRetryWithMaxInterval added in v0.20.0

func InvokeRetryWithMaxInterval(d time.Duration) InvocationRetryPolicyOption

func InvokeRetryWithOnMaxAttempts added in v0.20.0

func InvokeRetryWithOnMaxAttempts(v OnMaxAttempts) InvocationRetryPolicyOption

type OnMaxAttempts added in v0.20.0

type OnMaxAttempts string

OnMaxAttempts determines behavior when max attempts is reached.

const (
	OnMaxAttemptsPause OnMaxAttempts = "PAUSE"
	OnMaxAttemptsKill  OnMaxAttempts = "KILL"
)

type PromiseOption added in v0.12.0

type PromiseOption interface {
	BeforePromise(*PromiseOptions)
}

type PromiseOptions added in v0.12.0

type PromiseOptions struct {
	Codec encoding.Codec
}

type RequestOption added in v0.11.0

type RequestOption interface {
	BeforeRequest(*RequestOptions)
}

type RequestOptions added in v0.11.0

type RequestOptions struct {
	IdempotencyKey string
	Headers        map[string]string
}

type ResolveAwakeableOption

type ResolveAwakeableOption interface {
	BeforeResolveAwakeable(*ResolveAwakeableOptions)
}

type ResolveAwakeableOptions

type ResolveAwakeableOptions struct {
	Codec encoding.Codec
}

type RunOption

type RunOption interface {
	BeforeRun(*RunOptions)
}

type RunOptions

type RunOptions struct {
	// MaxRetryAttempts (including the initial attempt) before giving up.
	//
	// When giving up, Run will return a TerminalError wrapping the original error message.
	MaxRetryAttempts *uint

	// MaxRetryDuration before giving up.
	//
	// When giving up, Run will return a TerminalError wrapping the original error message.
	MaxRetryDuration *time.Duration

	// InitialRetryInterval for the first retry attempt.
	//
	// The retry interval will grow by a factor specified in RetryIntervalFactor.
	//
	// If any of the other retry options are set, this will be set by default to 50 milliseconds.
	InitialRetryInterval *time.Duration

	// RetryIntervalFactor to use when computing the next retry delay.
	//
	// If any of the other retry options are set, this will be set by default to 2, meaning retry interval will double at each attempt.
	RetryIntervalFactor *float32

	// MaxRetryInterval between retries.
	// Retry interval will grow by a factor specified in RetryIntervalFactor up to the interval specified in this value.
	//
	// If any of the other retry options are set, this will be set by default to 2 seconds.
	MaxRetryInterval *time.Duration

	// Name used for observability.
	Name string

	// Codec used to encode/decode the run result.
	Codec encoding.Codec
}

type SendOption added in v0.11.0

type SendOption interface {
	BeforeSend(*SendOptions)
}

type SendOptions added in v0.11.0

type SendOptions struct {
	IdempotencyKey string
	Headers        map[string]string
	Delay          time.Duration
}

type ServiceDefinitionOption added in v0.10.0

type ServiceDefinitionOption interface {
	BeforeServiceDefinition(*ServiceDefinitionOptions)
}

type ServiceDefinitionOptions added in v0.10.0

type ServiceDefinitionOptions struct {
	DefaultCodec          encoding.PayloadCodec
	Metadata              map[string]string
	Documentation         string
	AbortTimeout          *time.Duration
	EnableLazyState       *bool
	IdempotencyRetention  *time.Duration
	WorkflowRetention     *time.Duration
	InactivityTimeout     *time.Duration
	IngressPrivate        *bool
	JournalRetention      *time.Duration
	InvocationRetryPolicy *InvocationRetryPolicy
}

type SetOption

type SetOption interface {
	BeforeSet(*SetOptions)
}

type SetOptions

type SetOptions struct {
	Codec encoding.Codec
}

type SleepOption added in v0.16.0

type SleepOption interface {
	BeforeSleep(*SleepOptions)
}

type SleepOptions added in v0.16.0

type SleepOptions struct {
	// Name used for observability.
	Name string
}

Jump to

Keyboard shortcuts

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