@@ -445,6 +445,26 @@ func (wc *workflowClient) TerminateWorkflow(ctx context.Context, workflowID stri
445445 return err
446446}
447447
448+ // GetWorkflowHistoryWithOptionsRequest is the request to GetWorkflowHistoryWithOptions
449+ type GetWorkflowHistoryWithOptionsRequest struct {
450+ // WorkflowID specifies the workflow to request. Required.
451+ WorkflowID string
452+ // RunID is an optional field used to identify a specific run of the workflow.
453+ // If RunID is not provided the latest run will be used.
454+ RunID string
455+ // IsLongPoll is an optional field indicating whether to continue polling for new events until the workflow is terminal.
456+ // If IsLongPoll is true, the client can continue to iterate on new events that occur after the initial request.
457+ // Note that this means the client request will remain open until the workflow is terminal.
458+ IsLongPoll bool
459+ // FilterType is an optional field used to specify which events to return.
460+ // CloseEvent will only return the last event in the workflow history.
461+ FilterType s.HistoryEventFilterType
462+ // QueryConsistencyLevel is an optional field used to specify the consistency level for the query.
463+ // QueryConsistencyLevelStrong will query the currently active cluster for this workflow - at the potential cost of additional latency.
464+ // If not set, server will use the default consistency level.
465+ QueryConsistencyLevel * s.QueryConsistencyLevel
466+ }
467+
448468// GetWorkflowHistory return a channel which contains the history events of a given workflow
449469func (wc * workflowClient ) GetWorkflowHistory (
450470 ctx context.Context ,
@@ -800,6 +820,19 @@ func (wc *workflowClient) GetSearchAttributes(ctx context.Context) (*s.GetSearch
800820 return response , nil
801821}
802822
823+ // DescribeWorkflowExecutionWithOptionsRequest is the request to DescribeWorkflowExecutionWithOptions
824+ type DescribeWorkflowExecutionWithOptionsRequest struct {
825+ // WorkflowID specifies the workflow to request. Required.
826+ WorkflowID string
827+ // RunID is an optional field used to identify a specific run of the workflow.
828+ // If RunID is not provided the latest run will be used.
829+ RunID string
830+ // QueryConsistencyLevel is an optional field used to specify the consistency level for the query.
831+ // QueryConsistencyLevelStrong will query the currently active cluster for this workflow - at the potential cost of additional latency.
832+ // If not set, server will use the default consistency level.
833+ QueryConsistencyLevel * s.QueryConsistencyLevel
834+ }
835+
803836// DescribeWorkflowExecution returns information about the specified workflow execution.
804837// The errors it can return:
805838// - BadRequestError
@@ -909,39 +942,6 @@ type QueryWorkflowWithOptionsResponse struct {
909942 QueryRejected * s.QueryRejected
910943}
911944
912- // GetWorkflowHistoryWithOptionsRequest is the request to GetWorkflowHistoryWithOptions
913- type GetWorkflowHistoryWithOptionsRequest struct {
914- // WorkflowID specifies the workflow to request. Required.
915- WorkflowID string
916- // RunID is an optional field used to identify a specific run of the workflow.
917- // If RunID is not provided the latest run will be used.
918- RunID string
919- // IsLongPoll is an optional field indicating whether to continue polling for new events until the workflow is terminal.
920- // If IsLongPoll is true, the client can continue to iterate on new events that occur after the initial request.
921- // Note that this means the client request will remain open until the workflow is terminal.
922- IsLongPoll bool
923- // FilterType is an optional field used to specify which events to return.
924- // CloseEvent will only return the last event in the workflow history.
925- FilterType s.HistoryEventFilterType
926- // QueryConsistencyLevel is an optional field used to specify the consistency level for the query.
927- // QueryConsistencyLevelStrong will query the currently active cluster for this workflow - at the potential cost of additional latency.
928- // If not set, server will use the default consistency level.
929- QueryConsistencyLevel * s.QueryConsistencyLevel
930- }
931-
932- // DescribeWorkflowExecutionWithOptionsRequest is the request to DescribeWorkflowExecutionWithOptions
933- type DescribeWorkflowExecutionWithOptionsRequest struct {
934- // WorkflowID specifies the workflow to request. Required.
935- WorkflowID string
936- // RunID is an optional field used to identify a specific run of the workflow.
937- // If RunID is not provided the latest run will be used.
938- RunID string
939- // QueryConsistencyLevel is an optional field used to specify the consistency level for the query.
940- // QueryConsistencyLevelStrong will query the currently active cluster for this workflow - at the potential cost of additional latency.
941- // If not set, server will use the default consistency level.
942- QueryConsistencyLevel * s.QueryConsistencyLevel
943- }
944-
945945// QueryWorkflowWithOptions queries a given workflow execution and returns the query result synchronously.
946946// See QueryWorkflowWithOptionsRequest and QueryWorkflowWithOptionsResult for more information.
947947// The errors it can return:
0 commit comments