sadefs

package
v1.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceID           = "NamespaceId"
	WorkflowID            = "WorkflowId"
	RunID                 = "RunId"
	WorkflowType          = "WorkflowType"
	StartTime             = "StartTime"
	ExecutionTime         = "ExecutionTime"
	CloseTime             = "CloseTime"
	ExecutionStatus       = "ExecutionStatus"
	TaskQueue             = "TaskQueue"
	HistoryLength         = "HistoryLength"
	ExecutionDuration     = "ExecutionDuration"
	StateTransitionCount  = "StateTransitionCount"
	TemporalChangeVersion = "TemporalChangeVersion"
	BinaryChecksums       = "BinaryChecksums"
	BatcherNamespace      = "BatcherNamespace"
	BatcherUser           = "BatcherUser"
	HistorySizeBytes      = "HistorySizeBytes"
	ParentWorkflowID      = "ParentWorkflowId"
	ParentRunID           = "ParentRunId"
	RootWorkflowID        = "RootWorkflowId"
	RootRunID             = "RootRunId"

	TemporalNamespaceDivision = "TemporalNamespaceDivision"

	// These fields are not in Elasticsearch mappings definition and therefore are not indexed.
	MemoEncoding      = "MemoEncoding"
	Memo              = "Memo"
	VisibilityTaskKey = "VisibilityTaskKey"

	// Added to workflows started by a schedule.
	TemporalScheduledStartTime = "TemporalScheduledStartTime"
	TemporalScheduledById      = "TemporalScheduledById"

	// Used by scheduler workflow.
	TemporalSchedulePaused = "TemporalSchedulePaused"

	ReservedPrefix = "Temporal"

	// A user may specify a ScheduleID in a query even if a ScheduleId search attribute isn't defined for the namespace.
	// In such a case, ScheduleId is effectively a fake search attribute. Of course, a user may optionally choose to
	// define a custom ScheduleId search attribute, in which case the query using the ScheduleId would operate just like
	// any other custom search attribute.
	ScheduleID = "ScheduleId"

	// TODO: Remove this hardcoded constant.
	ActivityID = "ActivityId"

	// TemporalPauseInfo is a search attribute that stores the information about paused entities in the workflow.
	// Format of a single paused entity: "<key>:<value>".
	//  * <key> is something that can be used to identify the filtering condition
	//  * <value> is the value of the corresponding filtering condition.
	// examples:
	//   - for paused activities, manual pause, we may have 2 <key>:<value> pairs:
	//     * "Activity:MyCoolActivityType"
	//     * "Reason:ManualActivityPause"
	//     * or
	//     * "Policy:<some policy id>"
	//   - for paused workflows, we may have the following <key>:<value> pairs:
	//     * "Workflow:WorkflowID"
	//     * "Reason:ManualWorkflowPause"
	TemporalPauseInfo = "TemporalPauseInfo"

	// BuildIds is a KeywordList that holds information about current and past build ids
	// used by the workflow. Used for Worker Versioning
	// This SA is deprecated as of Versioning GA. Instead, users should use one of the following SAs for different purposes:
	// TemporalWorkflowVersioningBehavior, TemporalWorkerDeployment, TemporalWorkerDeploymentVersion, TemporalUsedWorkerDeploymentVersions.
	BuildIds = "BuildIds"

	// TemporalWorkerDeploymentVersion stores the current Worker Deployment Version
	// associated with the execution. It is updated at workflow task completion when
	// the SDK says what Version completed the workflow task. It can have a value for
	// unversioned workflows, if they are processed by an unversioned deployment.
	TemporalWorkerDeploymentVersion = "TemporalWorkerDeploymentVersion"

	// TemporalWorkerDeployment stores the current Worker Deployment associated with
	// the execution. It is updated at workflow task completion when the SDK says what
	// Worker Deployment completed the workflow task. It can have a value for
	// unversioned workflows, if they are processed by an unversioned deployment.
	TemporalWorkerDeployment = "TemporalWorkerDeployment"

	// TemporalWorkflowVersioningBehavior stores the current Versioning Behavior of the
	// execution. It is updated at workflow task completion when the server gets the
	// behavior (`auto_upgrade` or `pinned`) from the SDK. Empty for unversioned workflows.
	TemporalWorkflowVersioningBehavior = "TemporalWorkflowVersioningBehavior"

	// TemporalUsedWorkerDeploymentVersions is a KeywordList that holds all Worker Deployment
	// Versions that have completed workflow tasks for this workflow execution. Used for tracking
	// deployment version usage history. Format: "<deployment_name>:<build_id>" per entry.
	TemporalUsedWorkerDeploymentVersions = "TemporalUsedWorkerDeploymentVersions"

	// TemporalReportedProblems is a search attribute that stores the information about problems
	// the workflow has encountered in making progress. It is updated after successive workflow task
	// failures with the last workflow task failure cause. After the workflow task is completed
	// successfully, the search attribute is removed. Format of a single problem:
	// "category=<category> cause=<cause>".
	TemporalReportedProblems = "TemporalReportedProblems"

	// TemporalExternalPayloadCount is the count of external payloads referenced in the
	// entire history tree of the execution.
	TemporalExternalPayloadCount = "TemporalExternalPayloadCount"

	// TemporalExternalPayloadSizeBytes is the total size in bytes of all external payloads
	// referenced in the entire history tree of the execution.
	TemporalExternalPayloadSizeBytes = "TemporalExternalPayloadSizeBytes"
)
View Source
const (
	MetadataType = "type"
)

Variables

This section is empty.

Functions

func GetDBIndexSearchAttributes

func GetDBIndexSearchAttributes(
	override map[enumspb.IndexedValueType]int,
) *persistencespb.IndexSearchAttributes

func GetSqlDbColName

func GetSqlDbColName(name string) string

GetSqlDbColName maps system and reserved search attributes to column names for SQL tables. If the input is not a system or reserved search attribute, then it returns the input.

func IsChasmSearchAttribute

func IsChasmSearchAttribute(name string) bool

IsChasmSearchAttribute checks if a field name matches the pattern for CHASM search attributes. CHASM search attributes follow the pattern: Temporal<Type><NN> where NN is 01-99 Examples: TemporalInt01, TemporalDatetime02, TemporalDouble01, etc.

func IsChasmSystem

func IsChasmSystem(name string) bool

IsChasmSystem returns true if name is a system search attribute used by CHASM

func IsMappable

func IsMappable(name string) bool

IsMappable returns true if name can be mapped to the alias. Mappable search attributes are those that can be defined by the user.

func IsPreallocatedCSAFieldName

func IsPreallocatedCSAFieldName(name string, valueType enumspb.IndexedValueType) bool

func IsReserved

func IsReserved(name string) bool

IsReserved returns true if name is system reserved and can't be used as custom search attribute name.

func IsSystem

func IsSystem(name string) bool

IsSystem returns true if name is system search attribute

func Predefined

func Predefined() map[string]enumspb.IndexedValueType

Predefined returns a clone of the predefined search attributes map.

func PredefinedWhiteList

func PredefinedWhiteList() map[string]enumspb.IndexedValueType

PredefinedWhiteList returns a clone of the predefined whitelist search attributes map.

func QueryWithAnyNamespaceDivision

func QueryWithAnyNamespaceDivision(query string) string

QueryWithAnyNamespaceDivision returns a modified workflow visibility query that disables special handling of namespace division and so matches workflows in all namespace divisions. Normally a query that didn't explicitly mention TemporalNamespaceDivision would be limited to the default (empty string) namespace division.

func Reserved

func Reserved() map[string]struct{}

Reserved returns a clone of the reserved field names map.

func SetMetadataType

func SetMetadataType(p *commonpb.Payload, t enumspb.IndexedValueType)

func System

func System() map[string]enumspb.IndexedValueType

System returns a clone of the system search attributes map.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL