Skip to content

Commit 50d3f68

Browse files
authored
feat: Expose ActiveClusterSelectionPolicy type (#1469)
* feat: Expose ActiveClusterSelectionPolicy type * add comment
1 parent cf0b546 commit 50d3f68

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

client/client.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ type (
9292
// Valid values are QueryConsistencyLevelEventual (served by the receiving cluster), and QueryConsistencyLevelStrong (redirects to the active cluster).
9393
QueryConsistencyLevel = internal.QueryConsistencyLevel
9494

95+
// ActiveClusterSelectionPolicy - Policy for selecting the active cluster to start the workflow execution on for active-active domains.
96+
// An example policy is:
97+
// {
98+
// ClusterAttribute: {
99+
// Scope: "region",
100+
// Name: "us-west",
101+
// }
102+
// }
103+
// The workflow will be active in the corresponding active cluster of that cluster attribute specified in the policy
104+
// If the policy is empty or nil, the workflow will be active in the domain's active cluster.
105+
ActiveClusterSelectionPolicy = internal.ActiveClusterSelectionPolicy
106+
95107
// CancelOption values are functional options for the CancelWorkflow method.
96108
// Supported values can be created with:
97109
// - WithCancelReason(...)

internal/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,7 @@ type (
509509
CronOverlapPolicy s.CronOverlapPolicy
510510

511511
// ActiveClusterSelectionPolicy - Policy for selecting the active cluster to start the workflow execution on for active-active domains.
512-
// Note: This doesn't apply to local or active-passive domains.
513-
// Optional: defaulted to region sticky strategy with receiver cluster as the active cluster.
512+
// Optional: defaulted to nil, if it's nil, the active cluster of the workflow is the domain's active cluster.
514513
ActiveClusterSelectionPolicy *ActiveClusterSelectionPolicy
515514
}
516515

0 commit comments

Comments
 (0)