Skip to content

CycloneWorkflows in Go.

Each run is a row in Postgres. The client is part of your process. You do not add a broker.

Cyclone mark

Postgres 14 or laterGo 1.26.3 or later

Start with a step ​

A step is a Go function with a name. Enqueue starts one run. Result waits for that run and returns the typed output.

go
double := cyclone.NewStep("double", func(_ cyclone.Context, n int) (int, error) {
    return n * 2, nil
})

client, err := cyclone.New(pool, cyclone.WithHandlers(double))
if err != nil {
    return err
}
go client.Start(ctx)

run, err := double.Enqueue(ctx, client, 21)
if err != nil {
    return err
}
out, err := run.Result(ctx) // 42

New does not apply migrations. New does not start workers. The quickstart is a full program. First workflow connects two steps.

See what is running ​

Inspect runs and steps in the browser. You can retry a run, cancel a run, and check queues and schedules.

Cyclone UI dashboard. The page shows run counts, an outcomes chart, queues, and volume.

Common tasks ​

TaskGuide
Install Cyclone and apply migrationsInstall
Submit a workflow once for each requestSubmit once
Start one child run for each list itemFan out
Start another workflow from a nodeChild workflow
Stop new claims, then continue the runPause and resume
Start runs from a cron rowSchedules
Separate the producer from the workerProducer and worker
Prepare a production processProduction checklist

The methods on a step, an action, a workflow, and a run are the path these pages teach. The map is Methods.

Cyclone stores each run in Postgres.