Skip to content

Client.NewPollingTaskRunner

go
func (*Client) NewPollingTaskRunner(
    ctx context.Context,
    executor workflows.TaskExecutor,
    options ...runner.Option,
) (*workflows.PollingTaskRunner, error)

Create a polling runner for a custom task executor.

Use this lower-level runner when you need a custom execution backend, such as a dynamic runtime, but still want the Tilebox polling protocol to request, lease, and report tasks.

Parameters

executor workflows.TaskExecutor required

The executor that reports task capabilities and executes leased tasks.

options []runner.Option

Options for initializing the polling runner.

Options

runner.WithClusterSlug(clusterSlug string)

Default:

The cluster to poll for tasks. If not provided, the default cluster is used.

runner.WithRunnerLogger(logger *slog.Logger)

Default: slog.Default()

Set the logger to use for the polling runner.

Returns

The created polling runner.

Type to search…