Skip to main content
func (*Client) NewTaskRunner(
  ctx context.Context,
  options ...runner.Option,
) (*workflows.TaskRunner, error)
Initialize a runner.

Parameters

options
[]runner.Option
Options for initializing the runner

Options

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

Returns

The created runner object.
runner, err := client.NewTaskRunner(ctx)