Skip to main content

Go SDK

The Go SDK for writing TaskDaemon handlers.

Installation

Use a reviewed SDK revision or release for deployment. Keep diagnostic logs on stderr; the handler protocol uses stdout for one response per task. A request starts with attempt: 1; retries require a valid retryable error and remaining stored budget.

Basic Usage

Task Struct

Result Functions

The Result struct:

Complete Example

The image example also uses github.com/nfnt/resize:

Error Handling

JSON parsing errors are automatically handled:

Dockerfile

For a smaller image with static linking:

Handler Configuration