Skip to main content

Introduction to the Temporal Go SDK

Welcome to the Temporal Go SDK developer’s guide.

Temporal Go SDK API reference
Recommend a Temporal SDK

The information on this page helps a developer recommend a Temporal SDK based on project needs.

The Temporal Go SDK released on March 23, 2020, and enables developers to build, test, and execute Temporal applications in Go.

This guide documents the concepts, features, and tools that developers encounter on their journey. It contextualizes Temporal Application development through a specific set of use cases. For example, we work within the Background Check use case for the first several sections. And it relies on a set of sample applications specifically tailored to meet the needs of this guide. You can expect to see several applications in use to capture the iterative steps, provide a means to showcase best practices, and teach core concepts.

Supported runtimes

What are the supported Go runtimes?

The Temporal Go SDK supports Go 1.18+.

The Temporal Go SDK does not currently support generics.

Ensure you have the latest version of the Temporal Go SDK by checking releases.

Add to project

go get go.temporal.io/sdk

Import SDK packages in your code:

import (
"go.temporal.io/sdk/client"
// other imports...
)

Expected skills and experiences

What Go programming skills and experiences should a developer have to succeed with the Go SDK?

The Temporal Platform enables developers to build a wide range of applications that serve a variety of use cases.

We recommend that developers are equipped with some of the following skills to develop production-level Temporal Applications:

Recommended

Core fundamentals:

  • Go syntax and structure
  • Variables, Types, and Structures
  • Control flow: loops, conditionals
  • Slices and Maps
  • Basic I/O operations

Go-specific principles:

  • Understanding Goroutines and Channels
  • Error handling in Go
  • Go Modules and Dependency Management
  • Pointers in Go
  • Structs, Interfaces, and Embedding
  • Go Testing and Benchmarking
Nice to have

Tools

We recommend that developers have a beginner to moderate level of experience using a Go IDE, or a preferred editor with Go extensions, such as Visual Studio Code with Go extension.

Testing

We recommend that developers have some experience with Go's built-in testing framework.

Code base version control

We recommend that developers have some experience using a version control system, such as Git.

Dependency management

Being familiar with Go modules for dependency management can be beneficial.

Listing and sorting

Understanding SQL-like syntax and CRUD operational concepts can help utilize Temporal’s Visibility tools.

Security

We recommend having some understanding and experience with TLS, security certificates, and private keys for onboarding with Temporal Cloud or setting up a Self-Hosted Cluster.

Privacy

We advise having an understanding and experience with PII and sensitive information encryption for applications that handle user data.

Complex and large-scale use cases

Large scale use cases

For intricate and vast use cases, having some experience with the following could be helpful:

  • Deeper Go runtime understanding, including:
    • Go's memory model
    • Go garbage collection
  • Design Patterns applicable to Go, such as Singletons or Factories.
  • Distributed system architectures:
    • Event-driven architectures and how events drive processes in the context of Workflows.
  • The distinctions between stateful vs. stateless processes.
  • Implications of service scalability on performance and reliability.
  • Ensuring fault tolerance and understanding supervisor systems for progress checks and resumptions.

Code samples and resources

Where can I find code samples and other resources to learn to use the Go SDK?

Where can I get help with using the Go SDK?

How to follow updates to the Go SDK

How to contribute to the Temporal Go SDK

The Temporal Go SDK is MIT licensed, and contributions are welcome. Please review our contribution guidelines.