> ## Documentation Index
> Fetch the complete documentation index at: https://headgate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Go SDK overview

> The core module, separate drivers, and main producer/runtime types.

The root Go module contains driver-free contracts, producer behavior, registry, runner,
steps, scheduler, middleware, plugins, and subscriptions. Drivers and optional feature
layers are separate modules so applications pull only the dependencies they select.

```bash theme={"system"}
go get github.com/mujhtech/headgate/go
go get github.com/mujhtech/headgate/go/driver/headgatepgx
```

Optional modules keep their existing import paths and version independently with the Go
workspace:

```bash theme={"system"}
go get github.com/mujhtech/headgate/go/headgateworkflow
go get github.com/mujhtech/headgate/go/headgatecrypto
```

| Type       | Role                                      |
| ---------- | ----------------------------------------- |
| `Client`   | Validated producer boundary               |
| `Envelope` | Durable job and policy inputs             |
| `Registry` | Kind/version dispatch table               |
| `Runner`   | Admission, heartbeat, execution, shutdown |
| `Job[T]`   | Typed payload and attempt metadata        |
| `Config`   | Queues, concurrency, leases, telemetry    |

<CardGroup cols={2}>
  <Card title="Define tasks" icon="braces" href="/docs/sdk/go/tasks" />

  <Card title="Run workers" icon="server" href="/docs/sdk/go/runner" />
</CardGroup>
