Skip to content

Client.NewTaskRunner

func (*Client) NewTaskRunner(
ctx context.Context,
options ...runner.Option,
) (*workflows.TaskRunner, error)

Initialize a runner.

options []runner.Option

Options for initializing the runner

runner.WithClusterSlug(clusterSlug string)

Default:

The cluster to connect to. If not provided, the default cluster is used.

runner.WithRunnerLogger(logger *slog.Logger)

Default: slog.Default()

Set the logger to use for the runner

runner.WithDisableMetrics()

Disable OpenTelemetry metrics for the runner

The created runner object.