Documentation ¶
Index ¶
- Constants
- func AssignedBuildIdSearchAttribute(buildId string) string
- func BuildIdIfUsingVersioning(stamp *commonpb.WorkerVersionStamp) string
- func DeploymentFromCapabilities(capabilities *commonpb.WorkerVersionCapabilities) *deploymentpb.Deployment
- func DeploymentToString(deployment *deploymentpb.Deployment) string
- func FindBuildId(versioningData *persistencespb.VersioningData, buildId string) (setIndex, indexInSet int)
- func FindCurrentDeployment(deployments *persistencespb.DeploymentData) *deploymentpb.Deployment
- func IsUnversionedOrAssignedBuildIdSearchAttribute(buildId string) bool
- func MakeBuildIdDirective(buildId string) *taskqueuespb.TaskVersionDirective
- func MakeDirectiveForWorkflowTask(inheritedBuildId string, assignedBuildId string, ...) *taskqueuespb.TaskVersionDirective
- func MakeUseAssignmentRulesDirective() *taskqueuespb.TaskVersionDirective
- func PinnedBuildIdSearchAttribute(deployment *deploymentpb.Deployment) string
- func StampFromBuildId(buildId string) *commonpb.WorkerVersionStamp
- func StampFromCapabilities(cap *commonpb.WorkerVersionCapabilities) *commonpb.WorkerVersionStamp
- func StampIfUsingVersioning(stamp *commonpb.WorkerVersionStamp) *commonpb.WorkerVersionStamp
- func UnversionedBuildIdSearchAttribute(buildId string) string
- func ValidateDeployment(deployment *deploymentpb.Deployment) error
- func ValidateVersioningOverride(override *workflowpb.VersioningOverride) error
- func VersionStampToBuildIdSearchAttribute(stamp *commonpb.WorkerVersionStamp) string
- func VersionedBuildIdSearchAttribute(buildId string) string
- func WorkflowsExistForBuildId(ctx context.Context, visibilityManager manager.VisibilityManager, ...) (bool, error)
Constants ¶
const ( BuildIdSearchAttributePrefixPinned = "pinned" BuildIdSearchAttributeDelimiter = ":" BuildIdSearchAttributeEscape = "|" // UnversionedSearchAttribute is the sentinel value used to mark all unversioned workflows UnversionedSearchAttribute = buildIdSearchAttributePrefixUnversioned )
Variables ¶
This section is empty.
Functions ¶
func AssignedBuildIdSearchAttribute ¶ added in v1.24.0
AssignedBuildIdSearchAttribute returns the search attribute value for the currently assigned build ID
func BuildIdIfUsingVersioning ¶ added in v1.24.0
func BuildIdIfUsingVersioning(stamp *commonpb.WorkerVersionStamp) string
BuildIdIfUsingVersioning returns the given WorkerVersionStamp if it is using versioning, otherwise returns nil.
func DeploymentFromCapabilities ¶ added in v1.26.2
func DeploymentFromCapabilities(capabilities *commonpb.WorkerVersionCapabilities) *deploymentpb.Deployment
DeploymentFromCapabilities returns the deployment if it is using versioning V3, otherwise nil.
func DeploymentToString ¶ added in v1.26.2
func DeploymentToString(deployment *deploymentpb.Deployment) string
DeploymentToString is intended to be used for logs and metrics only. Theoretically, it can map different deployments to the string. DO NOT USE IN SERVER LOGIC.
func FindBuildId ¶
func FindBuildId(versioningData *persistencespb.VersioningData, buildId string) (setIndex, indexInSet int)
FindBuildId finds a build ID in the version data's sets, returning (set index, index within that set). Returns -1, -1 if not found.
func FindCurrentDeployment ¶ added in v1.26.2
func FindCurrentDeployment(deployments *persistencespb.DeploymentData) *deploymentpb.Deployment
func IsUnversionedOrAssignedBuildIdSearchAttribute ¶ added in v1.24.0
IsUnversionedOrAssignedBuildIdSearchAttribute returns the value is "unversioned" or "assigned:<bld>"
func MakeBuildIdDirective ¶ added in v1.24.0
func MakeBuildIdDirective(buildId string) *taskqueuespb.TaskVersionDirective
func MakeDirectiveForWorkflowTask ¶ added in v1.22.0
func MakeDirectiveForWorkflowTask( inheritedBuildId string, assignedBuildId string, stamp *commonpb.WorkerVersionStamp, hasCompletedWorkflowTask bool, behavior enumspb.VersioningBehavior, deployment *deploymentpb.Deployment, ) *taskqueuespb.TaskVersionDirective
MakeDirectiveForWorkflowTask returns a versioning directive based on the following parameters: - inheritedBuildId: build ID inherited from a past/previous wf execution (for Child WF or CaN) - assignedBuildId: the build ID to which the WF is currently assigned (i.e. mutable state's AssginedBuildId) - stamp: the latest versioning stamp of the execution (only needed for old versioning) - hasCompletedWorkflowTask: if the wf has completed any WFT - behavior: workflow's effective behavior - deployment: workflow's effective deployment
func MakeUseAssignmentRulesDirective ¶ added in v1.24.0
func MakeUseAssignmentRulesDirective() *taskqueuespb.TaskVersionDirective
func PinnedBuildIdSearchAttribute ¶ added in v1.26.2
func PinnedBuildIdSearchAttribute(deployment *deploymentpb.Deployment) string
PinnedBuildIdSearchAttribute returns the search attribute value for the currently assigned pinned build ID in the form 'pinned:<deployment_series_name>:<deployment_build_id>'. Each workflow execution will have at most one member of the BuildIds KeywordList in this format. If the workflow becomes unpinned or unversioned, this entry will be removed from that list.
func StampFromBuildId ¶ added in v1.26.2
func StampFromBuildId(buildId string) *commonpb.WorkerVersionStamp
func StampFromCapabilities ¶ added in v1.24.0
func StampFromCapabilities(cap *commonpb.WorkerVersionCapabilities) *commonpb.WorkerVersionStamp
func StampIfUsingVersioning ¶ added in v1.22.0
func StampIfUsingVersioning(stamp *commonpb.WorkerVersionStamp) *commonpb.WorkerVersionStamp
StampIfUsingVersioning returns the given WorkerVersionStamp if it is using versioning, otherwise returns nil.
func UnversionedBuildIdSearchAttribute ¶
UnversionedBuildIdSearchAttribute returns the search attribute value for an unversioned build ID
func ValidateDeployment ¶ added in v1.26.2
func ValidateDeployment(deployment *deploymentpb.Deployment) error
ValidateDeployment returns error if the deployment is nil or it has empty build ID or deployment name.
func ValidateVersioningOverride ¶ added in v1.26.2
func ValidateVersioningOverride(override *workflowpb.VersioningOverride) error
func VersionStampToBuildIdSearchAttribute ¶
func VersionStampToBuildIdSearchAttribute(stamp *commonpb.WorkerVersionStamp) string
VersionStampToBuildIdSearchAttribute returns the search attribute value for a version stamp
func VersionedBuildIdSearchAttribute ¶
VersionedBuildIdSearchAttribute returns the search attribute value for a versioned build ID
Types ¶
This section is empty.