Back to

Package cadence

Latest Go to latest
Published: Jan 17, 2018 | License: MIT | Module:


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.


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

type CanceledError

type CanceledError = internal.CanceledError

CanceledError returned when operation was canceled.

func NewCanceledError

func NewCanceledError(details ...interface{}) *CanceledError

NewCanceledError creates CanceledError instance. Return this error from activity or child workflow to indicate that it was successfully cancelled.

type CustomError

type CustomError = internal.CustomError

CustomError returned from workflow and activity implementations with reason and optional details.

func NewCustomError

func NewCustomError(reason string, details ...interface{}) *CustomError

NewCustomError create new instance of *CustomError with reason and optional details. Use CustomError for any use case specific errors that cross activity and child workflow boundaries.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier