Skip to content

Go SDK

The code for the Golang SDk is available on Github. Please feel free to file PRs, issues, etc. there.

Quick Start

  1. Setup conductor-go package
  2. Create and run Task Workers
  3. Create workflows using Code
  4. API Documentation

Setup conductor go package

Create a folder to build your package:

mkdir quickstart/
cd quickstart/
go mod init quickstart

Get Conductor Go SDK

go get github.com/conductor-sdk/conductor-go

Configuration

Authentication settings (optional)

Use if your conductor server requires authentication * keyId: Key * keySecret: Secret for the Key

authenticationSettings := settings.NewAuthenticationSettings(
  "keyId",
  "keySecret",
)

Access Control Setup

See Access Control for more details on role based access control with Conductor and generating API keys for your environment.

Configure API Client

apiClient := client.NewAPIClient(
    settings.NewAuthenticationSettings(
        KEY,
        SECRET,
    ),
    settings.NewHttpSettings(
        "https://play.orkes.io",
    ),
)

Setup Logging

SDK uses logrus for the logging.

func init() {
    log.SetFormatter(&log.TextFormatter{})
    log.SetOutput(os.Stdout)
    log.SetLevel(log.DebugLevel)
}

Next: Create and run Task Workers