Skip to content
5 changes: 5 additions & 0 deletions workflows/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ type PauseRequest struct {
type ResumeRequest struct {
InstanceID string `json:"instanceID"`
}

// PurgeRequest is the object describing a Purge request.
type PurgeRequest struct {
InstanceID string `json:"workflow_reference"`
Comment thread
RyanLettieri marked this conversation as resolved.
Outdated
}
5 changes: 5 additions & 0 deletions workflows/temporal/temporal.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ func (c *TemporalWF) RaiseEvent(ctx context.Context, req *workflows.RaiseEventRe
return c.client.SignalWorkflow(ctx, req.InstanceID, "", req.EventName, decodedEventData)
}

func (c *TemporalWF) Purge(ctx context.Context, req *workflows.PurgeRequest) error {
// Unimplemented
return nil
}

func (c *TemporalWF) Close() {
c.client.Close()
}
Expand Down
1 change: 1 addition & 0 deletions workflows/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type Workflow interface {
Terminate(ctx context.Context, req *TerminateRequest) error
Get(ctx context.Context, req *GetRequest) (*StateResponse, error)
RaiseEvent(ctx context.Context, req *RaiseEventRequest) error
Purge(ctx context.Context, req *PurgeRequest) error
Pause(ctx context.Context, req *PauseRequest) error
Resume(ctx context.Context, req *ResumeRequest) error
GetComponentMetadata() map[string]string
Expand Down