temporal

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IgnoreLastModifierKey = "temporal.io/ignore-last-modifier"
)

Variables

This section is empty.

Functions

func DeploymentShouldIgnoreLastModifier added in v1.0.0

func DeploymentShouldIgnoreLastModifier(
	ctx context.Context,
	deploymentHandler temporalClient.WorkerDeploymentHandle,
	routingConfig temporalClient.WorkerDeploymentRoutingConfig,
) (shouldIgnore bool, err error)

func GetTestWorkflowID

func GetTestWorkflowID(deploymentName, buildID, taskQueue string) string

GetTestWorkflowID generates a workflowID for test workflows

func GetTestWorkflowStatus

func GetTestWorkflowStatus(
	ctx context.Context,
	client temporalClient.Client,
	workerDeploymentName string,
	buildID string,
	workerDeploy *temporaliov1alpha1.TemporalWorkerDeployment,
	temporalState *TemporalWorkerState,
) ([]temporaliov1alpha1.WorkflowExecution, error)

GetTestWorkflowStatus queries Temporal to get the status of test workflows for a version

func HasNoVersionedPollers added in v1.0.0

func HasNoVersionedPollers(ctx context.Context,
	client temporalClient.Client,
	taskQueueInfo temporalClient.WorkerDeploymentTaskQueueInfo,
) (bool, error)

func HasUnversionedPoller added in v1.0.0

func HasUnversionedPoller(ctx context.Context,
	client temporalClient.Client,
	taskQueueInfo temporalClient.WorkerDeploymentTaskQueueInfo,
) (bool, error)

Types

type TemporalWorkerState

type TemporalWorkerState struct {
	CurrentBuildID       string
	VersionConflictToken []byte
	RampingBuildID       string
	RampPercentage       float32
	// RampingSince is the time when the current ramping version was set.
	RampingSince       *metav1.Time
	RampLastModifiedAt *metav1.Time
	// Versions indexed by build ID
	Versions             map[string]*VersionInfo
	LastModifierIdentity string
	IgnoreLastModifier   bool
}

TemporalWorkerState represents the state of a worker deployment in Temporal

func GetWorkerDeploymentState

func GetWorkerDeploymentState(
	ctx context.Context,
	client temporalClient.Client,
	workerDeploymentName string,
	namespace string,
	k8sDeployments map[string]*appsv1.Deployment,
	targetBuildId string,
	strategy temporaliov1alpha1.DefaultVersionUpdateStrategy,
	controllerIdentity string,
) (*TemporalWorkerState, error)

GetWorkerDeploymentState queries Temporal to get the state of a worker deployment

type VersionInfo

type VersionInfo struct {
	DeploymentName string
	BuildID        string
	Status         temporaliov1alpha1.VersionStatus
	DrainedSince   *time.Time
	TaskQueues     []temporaliov1alpha1.TaskQueue
	TestWorkflows  []temporaliov1alpha1.WorkflowExecution

	// True if all task queues in this version have at least one unversioned poller.
	// False could just mean unknown / not checked / not checked successfully.
	// Only checked for Target Version when Current Version is nil and strategy is Progressive.
	// Used to decide whether to fast track the rollout; rollout will be AllAtOnce if:
	//   - Current Version is nil
	//   - Strategy is Progressive, and
	//   - Presence of unversioned pollers in all task queues of target version cannot be confirmed.
	AllTaskQueuesHaveUnversionedPoller bool
	// True if all task queues in this version have no versioned pollers.
	// False could just mean unknown / not checked / not checked successfully.
	// Only checked for Drained versions that don't have controller-managed Deployments.
	// Used to compute status.VersionCountIneligibleForDeletion.
	NoTaskQueuesHaveVersionedPoller bool
}

VersionInfo contains information about a specific version

Jump to

Keyboard shortcuts

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