Package cadence and its subdirectories contain a Cadence client side framework.
The Cadence service is a task orchestrator for your application’s tasks. Applications using Cadence can execute a logical flow of tasks, especially long-running business logic, asynchronously or synchronously. and can scale runtime on distributed systems without you, the service owner, worrying about infrastructure needs.
A quick example illustrates its use case. Consider Uber Eats where Cadence manages the entire business flow from placing an order, accepting it, handling shopping cart processes (adding, updating, and calculating cart items), entering the order in a pipeline (for preparing food and coordinating delivery), to scheduling delivery as well as handling payments.
Cadence consists of a programming framework (or client library) and a managed service (or backend). The framework enables developers to author and coordinate tasks in Go code.
The root cadence package contains common data structures. The subpackages are:
workflow - functions used to implement workflows
activity - functions used to implement activities
client - functions used to create Cadence service client used to start and monitor workflow executions.
worker - functions used to create worker instance used to host workflow and activity code.
testsuite - unit testing framework for activity and workflow testing.
- func IsCanceledError(err error) bool
- func IsCustomError(err error) bool
- func IsGenericError(err error) bool
- func IsPanicError(err error) bool
- func IsTerminatedError(err error) bool
- func IsTimeoutError(err error) bool
- type CanceledError
- type CustomError
Package Files ¶
const LibraryVersion = internal.LibraryVersion
LibraryVersion is a semver string that represents the version of this cadence client library it will be embedded as a "version" header in every rpc call made by this client to cadence server. In addition, the version string will be used by the server to enforce compatibility checks Update to this version number is typically done by the cadence team as part of a major feature or behavior change
ErrNoData is returned when trying to extract strong typed data while there is no data available.
func IsCanceledError ¶
IsCanceledError return if the err is a CanceledError
func IsCustomError ¶
IsCustomError return if the err is a CustomError
func IsGenericError ¶
IsGenericError return if the err is a GenericError
func IsPanicError ¶
IsPanicError return if the err is a PanicError
func IsTerminatedError ¶
IsTerminatedError return if the err is a TerminatedError
type CanceledError ¶
type CanceledError = internal.CanceledError
CanceledError returned when operation was canceled.
type CustomError ¶
type CustomError = internal.CustomError
CustomError returned from workflow and activity implementations with reason and optional details.