Documentation ¶
Index ¶
- Constants
- func NewClientError(err error) error
- func UnwrapError(err error) error
- func WrapClientError(err error) error
- type ClientError
- type DetailedError
- type StringContextPropagator
- func (s StringContextPropagator) Extract(ctx context.Context, reader workflow.HeaderReader) (context.Context, error)
- func (s StringContextPropagator) ExtractToWorkflow(ctx workflow.Context, reader workflow.HeaderReader) (workflow.Context, error)
- func (s StringContextPropagator) Inject(ctx context.Context, writer workflow.HeaderWriter) error
- func (s StringContextPropagator) InjectFromWorkflow(ctx workflow.Context, writer workflow.HeaderWriter) error
Constants ¶
View Source
const ClientErrorReason = "ClientError"
Cadence client error reason.
Variables ¶
This section is empty.
Functions ¶
func NewClientError ¶
NewClientError returns a new client error.
func UnwrapError ¶
UnwrapError returns a new detailed error based on the wrapped string, or the original error otherwise
func WrapClientError ¶
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 (s StringContextPropagator) Extract(ctx context.Context, reader workflow.HeaderReader) (context.Context, error)
func (StringContextPropagator) ExtractToWorkflow ¶
func (s StringContextPropagator) ExtractToWorkflow(ctx workflow.Context, reader workflow.HeaderReader) (workflow.Context, error)
func (StringContextPropagator) Inject ¶
func (s StringContextPropagator) Inject(ctx context.Context, writer workflow.HeaderWriter) error
func (StringContextPropagator) InjectFromWorkflow ¶
func (s StringContextPropagator) InjectFromWorkflow(ctx workflow.Context, writer workflow.HeaderWriter) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.