README

Temporal Go SDK Build Status Coverage Status PkgGoDev

Temporal is a distributed, scalable, durable, and highly available orchestration engine used to execute asynchronous long-running business logic in a scalable and resilient way.

"Temporal Go SDK" is the framework for authoring workflows and activities using Go language.

How to use

Clone this repo into the preferred location.

git clone git@github.com:temporalio/sdk-go.git

or

go get -u go.temporal.io/sdk

See samples to get started.

Documentation is available here. You can also find the API documentation here.

Using a custom logger

Although the Go SDK does not support most third-party logging solutions natively, our friends at Banzai Cloud built the adapter package logur which makes it possible to use third party loggers with minimal overhead. Here is an example of using logur to support Logrus:

package main
import (
	"github.com/sirupsen/logrus"
	logrusadapter "logur.dev/adapter/logrus"
	"logur.dev/logur"
)

func main() {
	// feed this logger into Temporal
	logger := logur.LoggerToKV(logrusadapter.New(logrus.New()))
}

Most of the popular logging solutions have existing adapters in logur. If you're curious about which adapters are available, here is a helpful link.

Contributing

We'd love your help in making the Temporal Go SDK great. Please review our contribution guidelines.

License

MIT License, please see LICENSE for details.

Directories

Path Synopsis
Package activity contains functions and types used to implement Temporal Activities.
Package activity contains functions and types used to implement Temporal Activities.
Package client is used by external programs to communicate with Temporal service.
Package client is used by external programs to communicate with Temporal service.
Package internalbindings contains low level APIs to be used by non Go SDKs built on top of the Go SDK.
Package internalbindings contains low level APIs to be used by non Go SDKs built on top of the Go SDK.
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
Package temporal and its subdirectories contain the Temporal client side framework.
Package temporal and its subdirectories contain the Temporal client side framework.
test
Package testsuite contains unit testing framework for Temporal workflows and activities.
Package testsuite contains unit testing framework for Temporal workflows and activities.
Package worker contains functions to manage lifecycle of a Temporal client side worker.
Package worker contains functions to manage lifecycle of a Temporal client side worker.
Package workflow contains functions and types used to implement Temporal workflows.
Package workflow contains functions and types used to implement Temporal workflows.
cmd/dummy
This file exists to force compilation of all code that doesn't have unit tests.
This file exists to force compilation of all code that doesn't have unit tests.
log