options

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 2 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
}

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 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
}

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