Go SDKFeature Clients

Workflows ClientGo SDK

Accessed via client.Workflows() on the Hatchet client.

WorkflowsClient

WorkflowsClient provides methods for interacting with workflows

Methods:

NameDescription
DeleteDelete removes a workflow by its ID or name.
GetGet retrieves a workflow by its ID or name.
GetIdGetId retrieves a workflow by its name.
ListList retrieves all workflows for the tenant with optional filtering parameters.
PausePause pauses a workflow by its name.
UnpauseUnpause unpauses a workflow by its name.

Functions

Delete

Delete removes a workflow by its ID or name.

func (w *WorkflowsClient) Delete(ctx context.Context, workflowName string) (*rest.WorkflowDeleteResponse, error)

Parameters:

NameType
ctxcontext.Context
workflowNamestring

Returns:

Type
*rest.WorkflowDeleteResponse
error

Get

Get retrieves a workflow by its ID or name.

func (w *WorkflowsClient) Get(ctx context.Context, workflowName string) (*rest.Workflow, error)

Parameters:

NameType
ctxcontext.Context
workflowNamestring

Returns:

Type
*rest.Workflow
error

GetId

GetId retrieves a workflow by its name.

func (w *WorkflowsClient) GetId(ctx context.Context, workflowName string) (uuid.UUID, error)

Parameters:

NameType
ctxcontext.Context
workflowNamestring

Returns:

Type
uuid.UUID
error

List

List retrieves all workflows for the tenant with optional filtering parameters.

func (w *WorkflowsClient) List(ctx context.Context, opts *rest.WorkflowListParams) (*rest.WorkflowList, error)

Parameters:

NameType
ctxcontext.Context
opts*rest.WorkflowListParams

Returns:

Type
*rest.WorkflowList
error

Pause

Pause pauses a workflow by its name. While paused, new runs of the workflow are queued but not started.

func (w *WorkflowsClient) Pause(ctx context.Context, workflowName string, opts PauseWorkflowOpts) (*rest.Workflow, error)

Parameters:

NameType
ctxcontext.Context
workflowNamestring
optsPauseWorkflowOpts

Returns:

Type
*rest.Workflow
error

Unpause

Unpause unpauses a workflow by its name.

func (w *WorkflowsClient) Unpause(ctx context.Context, workflowName string) (*rest.Workflow, error)

Parameters:

NameType
ctxcontext.Context
workflowNamestring

Returns:

Type
*rest.Workflow
error

PauseWorkflowOpts

PauseWorkflowOpts contains the configuration for pausing a workflow.

Fields:

NameTypeDescription
QueueTTLtime.Duration(required) QueueTTL is how long runs stay queued while the workflow is paused before they are dropped.
CronRunQueueBehaviorrest.WorkflowPauseScheduledCronRunQueueBehavior(optional) CronRunQueueBehavior is the behavior of cron runs triggered while the workflow is paused. Defaults to QUEUE.
ScheduledRunQueueBehaviorrest.WorkflowPauseScheduledCronRunQueueBehavior(optional) ScheduledRunQueueBehavior is the behavior of scheduled runs triggered while the workflow is paused. Defaults to QUEUE.

Last updated on October 14, 2026

On this page