cadence

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ClientErrorReason = "ClientError"

Cadence client error reason.

Variables

This section is empty.

Functions

func NewClientError

func NewClientError(err error) error

NewClientError returns a new client error.

func UnwrapError

func UnwrapError(err error) error

UnwrapError returns a new detailed error based on the wrapped string, or the original error otherwise

func WrapClientError

func WrapClientError(err error) error

WrapClientError wraps an error into a custom cadence error if it's a client error.

Types

type ClientError

type ClientError interface {
	ClientError() (isClientError bool)
}

ClientError defines a bahavior based error type for Cadence client issues.

type DetailedError

type DetailedError interface {
	// error extends the interface with the standard error methods.
	error

	// Details returns the resulting (possibly nil) error after trying to decode
	// the error details into the provided value pointer.
	Details(valuePointers ...interface{}) (err error)
}

DetailedError encapsulates an error with a reason and one or more details.

type StringContextPropagator

type StringContextPropagator struct {
	// PropagationKey identifies a value in Cadence message headers.
	PropagationKey string

	// ContextKey identifies values in a context.
	ContextKey interface{}

	// Optional values will not emit an error when the key is missing from the context.
	// Useful when you want to propagate handling missing values to a higher level.
	Optional bool
}

StringContextPropagator implements a custom workflow.ContextPropagator for passing a single string value to workflows and activities.

func (StringContextPropagator) Extract

func (StringContextPropagator) ExtractToWorkflow

func (s StringContextPropagator) ExtractToWorkflow(ctx workflow.Context, reader workflow.HeaderReader) (workflow.Context, error)

func (StringContextPropagator) Inject

func (StringContextPropagator) InjectFromWorkflow

func (s StringContextPropagator) InjectFromWorkflow(ctx workflow.Context, writer workflow.HeaderWriter) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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