Hey everyone!
I’ve been working on Cord, an embedded durable workflow library for Go that uses Go 1.27’s generic methods to provide intuitive, type-safe, composable workflows.
The idea is to make durable workflows feel like ordinary Go composition, without requiring a separate workflow server or introducing a DSL.
A simple workflow looks like this:
c := cord.New(db)
deploy := c.From("deploy", Clone).
Then(Build).
Then(Push).
Then(Deploy)
result, err := deploy.Run(ctx, repo)
Workflows can branch and join while preserving types:
build := c.From("deploy", Clone).
Then(Build)
scan := build.Then(Scan)
push := build.Then(Push)
deploy := cord.Join(scan, push).
Then(Deploy)
Cord persists workflow state in SQL, so executions are durable and can resume after process restarts or failures. It’s designed to stay embedded in your application: your Go code defines the workflow, and your existing SQL database provides the durable state.
Go 1.27’s generic methods are a big part of what makes the composition API possible while keeping it type-safe and feeling natural in Go.
The project is still young, and I’d especially love feedback from the on the API and overall approach.
GitHub: GitHub - omarluq/cord: SQL-backed, durable, composable workflows for Go. · GitHub
Playground: Cord Playground · Durable Go Workflows