@@ -58,14 +58,14 @@ type callSubOrchestratorOptions struct {
58
58
retryPolicy * RetryPolicy
59
59
}
60
60
61
- // subOrchestratorOption is a functional option type for the CallSubOrchestrator orchestrator method.
62
- type subOrchestratorOption func (* callSubOrchestratorOptions ) error
61
+ // SubOrchestratorOption is a functional option type for the CallSubOrchestrator orchestrator method.
62
+ type SubOrchestratorOption func (* callSubOrchestratorOptions ) error
63
63
64
64
// ContinueAsNewOption is a functional option type for the ContinueAsNew orchestrator method.
65
65
type ContinueAsNewOption func (* OrchestrationContext )
66
66
67
67
// WithSubOrchestratorAppID is a functional option type for the CallSubOrchestrator orchestrator method that specifies the app ID of the target activity.
68
- func WithSubOrchestratorAppID (appID string ) subOrchestratorOption {
68
+ func WithSubOrchestratorAppID (appID string ) SubOrchestratorOption {
69
69
return func (opts * callSubOrchestratorOptions ) error {
70
70
opts .targetAppID = & appID
71
71
return nil
@@ -82,7 +82,7 @@ func WithKeepUnprocessedEvents() ContinueAsNewOption {
82
82
83
83
// WithSubOrchestratorInput is a functional option type for the CallSubOrchestrator
84
84
// orchestrator method that takes an input value and marshals it to JSON.
85
- func WithSubOrchestratorInput (input any ) subOrchestratorOption {
85
+ func WithSubOrchestratorInput (input any ) SubOrchestratorOption {
86
86
return func (opts * callSubOrchestratorOptions ) error {
87
87
bytes , err := marshalData (input )
88
88
if err != nil {
@@ -95,7 +95,7 @@ func WithSubOrchestratorInput(input any) subOrchestratorOption {
95
95
96
96
// WithRawSubOrchestratorInput is a functional option type for the CallSubOrchestrator
97
97
// orchestrator method that takes a raw input value.
98
- func WithRawSubOrchestratorInput (input * wrapperspb.StringValue ) subOrchestratorOption {
98
+ func WithRawSubOrchestratorInput (input * wrapperspb.StringValue ) SubOrchestratorOption {
99
99
return func (opts * callSubOrchestratorOptions ) error {
100
100
opts .rawInput = input
101
101
return nil
@@ -104,14 +104,14 @@ func WithRawSubOrchestratorInput(input *wrapperspb.StringValue) subOrchestratorO
104
104
105
105
// WithSubOrchestrationInstanceID is a functional option type for the CallSubOrchestrator
106
106
// orchestrator method that specifies the instance ID of the sub-orchestration.
107
- func WithSubOrchestrationInstanceID (instanceID string ) subOrchestratorOption {
107
+ func WithSubOrchestrationInstanceID (instanceID string ) SubOrchestratorOption {
108
108
return func (opts * callSubOrchestratorOptions ) error {
109
109
opts .instanceID = instanceID
110
110
return nil
111
111
}
112
112
}
113
113
114
- func WithSubOrchestrationRetryPolicy (policy * RetryPolicy ) subOrchestratorOption {
114
+ func WithSubOrchestrationRetryPolicy (policy * RetryPolicy ) SubOrchestratorOption {
115
115
return func (opt * callSubOrchestratorOptions ) error {
116
116
if policy == nil {
117
117
return nil
@@ -267,7 +267,7 @@ func (octx *OrchestrationContext) GetInput(v any) error {
267
267
// CallActivity schedules an asynchronous invocation of an activity function. The [activity]
268
268
// parameter can be either the name of an activity as a string or can be a pointer to the function
269
269
// that implements the activity, in which case the name is obtained via reflection.
270
- func (ctx * OrchestrationContext ) CallActivity (activity interface {}, opts ... callActivityOption ) Task {
270
+ func (ctx * OrchestrationContext ) CallActivity (activity interface {}, opts ... CallActivityOption ) Task {
271
271
options := new (callActivityOptions )
272
272
for _ , configure := range opts {
273
273
if err := configure (options ); err != nil {
@@ -317,8 +317,7 @@ func (ctx *OrchestrationContext) internalScheduleActivity(activityName, taskExec
317
317
return task
318
318
}
319
319
320
- // TODO: cassie wire appID into suborchestration options too for cross app wf
321
- func (ctx * OrchestrationContext ) CallSubOrchestrator (orchestrator interface {}, opts ... subOrchestratorOption ) Task {
320
+ func (ctx * OrchestrationContext ) CallSubOrchestrator (orchestrator interface {}, opts ... SubOrchestratorOption ) Task {
322
321
options := new (callSubOrchestratorOptions )
323
322
for _ , configure := range opts {
324
323
if err := configure (options ); err != nil {
@@ -421,7 +420,7 @@ func computeNextDelay(currentTimeUtc time.Time, policy RetryPolicy, attempt int,
421
420
}
422
421
423
422
// CreateTimer schedules a durable timer that expires after the specified delay.
424
- func (ctx * OrchestrationContext ) CreateTimer (delay time.Duration , opts ... createTimerOption ) Task {
423
+ func (ctx * OrchestrationContext ) CreateTimer (delay time.Duration , opts ... CreateTimerOption ) Task {
425
424
options := new (createTimerOptions )
426
425
for _ , configure := range opts {
427
426
if err := configure (options ); err != nil {
0 commit comments