deployment

package
v1.26.2-125.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Workflow types
	DeploymentWorkflowType       = "temporal-sys-deployment-workflow"
	DeploymentSeriesWorkflowType = "temporal-sys-deployment-series-workflow"

	// Namespace division
	DeploymentNamespaceDivision = "TemporalDeployment"

	// Updates
	RegisterWorkerInDeployment = "register-task-queue-worker" // for deployment wf
	SyncDeploymentState        = "sync-deployment-state"      // for deployment wfs
	SetCurrentDeployment       = "set-current-deployment"     // for series wfs

	// Signals
	ForceCANSignalName = "force-continue-as-new" // for deployment _and_ series wfs

	// Queries
	QueryDescribeDeployment = "describe-deployment" // for deployment wf
	QueryCurrentDeployment  = "current-deployment"  // for series wf

	// Memos
	DeploymentMemoField       = "DeploymentMemo"       // for deployment wf
	DeploymentSeriesMemoField = "DeploymentSeriesMemo" // for deployment series wf

	// Prefixes, Delimeters and Keys
	DeploymentWorkflowIDPrefix       = "temporal-sys-deployment"
	DeploymentSeriesWorkflowIDPrefix = "temporal-sys-deployment-series"
	DeploymentWorkflowIDDelimeter    = ":"
	DeploymentWorkflowIDEscape       = "|"
	DeploymentWorkflowIDInitialSize  = (2 * len(DeploymentWorkflowIDDelimeter)) + len(DeploymentWorkflowIDPrefix)
	SeriesFieldName                  = "DeploymentSeries"
	BuildIDFieldName                 = "BuildID"
)

Variables

Functions

func BuildQueryWithSeriesFilter

func BuildQueryWithSeriesFilter(seriesName string) string

BuildQueryWithSeriesFilter is a helper which builds a query for pattern matching based on the provided seriesName

func DecodeDeploymentMemo

func DecodeDeploymentMemo(memo *commonpb.Memo) *deploymentspb.DeploymentWorkflowMemo

func DeploymentWorkflow

func DeploymentWorkflow(ctx workflow.Context, deploymentWorkflowArgs *deploymentspb.DeploymentWorkflowArgs) error

func GenerateDeploymentSeriesWorkflowID

func GenerateDeploymentSeriesWorkflowID(deploymentSeriesName string) string

func GenerateDeploymentWorkflowID

func GenerateDeploymentWorkflowID(seriesName string, buildID string) string

GenerateDeploymentWorkflowID is a helper that generates a system accepted workflowID which are used in our deployment workflows

func GenerateDeploymentWorkflowIDForPatternMatching

func GenerateDeploymentWorkflowIDForPatternMatching(seriesName string) string

func NewResult

func NewResult(
	dc *dynamicconfig.Collection,
	params activityDeps,
) fxResult

func ValidateDeploymentWfParams

func ValidateDeploymentWfParams(fieldName string, field string, maxIDLengthLimit int) error

ValidateDeploymentWfParams is a helper that verifies if the fields used for generating deployment related workflowID's are valid

Types

type DeploymentActivities

type DeploymentActivities struct {
	// contains filtered or unexported fields
}

func (*DeploymentActivities) StartDeploymentSeriesWorkflow

func (a *DeploymentActivities) StartDeploymentSeriesWorkflow(ctx context.Context, input *deploymentspb.StartDeploymentSeriesRequest) error

func (*DeploymentActivities) SyncUserData

type DeploymentClientImpl

type DeploymentClientImpl struct {
	// contains filtered or unexported fields
}

implements DeploymentStoreClient

func (*DeploymentClientImpl) DescribeDeployment

func (d *DeploymentClientImpl) DescribeDeployment(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	seriesName string,
	buildID string,
) (_ *deploymentpb.DeploymentInfo, retErr error)

func (*DeploymentClientImpl) GetCurrentDeployment

func (d *DeploymentClientImpl) GetCurrentDeployment(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	seriesName string,
) (_ *deploymentpb.DeploymentInfo, retErr error)

func (*DeploymentClientImpl) GetDeploymentReachability

func (d *DeploymentClientImpl) GetDeploymentReachability(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	seriesName string,
	buildID string,
) (_ *workflowservice.GetDeploymentReachabilityResponse, retErr error)

TODO (carly): pass deployment instead of seriesName + buildId in all these APIs -- separate PR

func (*DeploymentClientImpl) ListDeployments

func (d *DeploymentClientImpl) ListDeployments(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	seriesName string,
	NextPageToken []byte,
) (_ []*deploymentpb.DeploymentListInfo, _ []byte, retErr error)

func (*DeploymentClientImpl) RegisterTaskQueueWorker

func (d *DeploymentClientImpl) RegisterTaskQueueWorker(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	deployment *deploymentpb.Deployment,
	taskQueueName string,
	taskQueueType enumspb.TaskQueueType,
	firstPoll time.Time,
	identity string,
	requestID string,
) (retErr error)

func (*DeploymentClientImpl) SetCurrentDeployment

func (d *DeploymentClientImpl) SetCurrentDeployment(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	deployment *deploymentpb.Deployment,
	updateMetadata *deploymentpb.UpdateDeploymentMetadata,
	identity string,
	requestID string,
) (_ *deploymentpb.DeploymentInfo, _ *deploymentpb.DeploymentInfo, retErr error)

func (*DeploymentClientImpl) StartDeploymentSeries

func (d *DeploymentClientImpl) StartDeploymentSeries(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	seriesName string,
	identity string,
	requestID string,
) (retErr error)

func (*DeploymentClientImpl) SyncDeploymentWorkflowFromSeries

func (d *DeploymentClientImpl) SyncDeploymentWorkflowFromSeries(
	ctx context.Context,
	namespaceEntry *namespace.Namespace,
	deployment *deploymentpb.Deployment,
	args *deploymentspb.SyncDeploymentStateArgs,
	identity string,
	requestID string,
) (_ *deploymentspb.SyncDeploymentStateResponse, retErr error)

type DeploymentSeriesActivities

type DeploymentSeriesActivities struct {
	// contains filtered or unexported fields
}

type DeploymentSeriesWorkflowRunner

type DeploymentSeriesWorkflowRunner struct {
	*deploymentspb.DeploymentSeriesWorkflowArgs
	// contains filtered or unexported fields
}

DeploymentWorkflowRunner holds the local state while running a deployment-series workflow

type DeploymentStoreClient

type DeploymentStoreClient interface {
	RegisterTaskQueueWorker(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		deployment *deploymentpb.Deployment,
		taskQueueName string,
		taskQueueType enumspb.TaskQueueType,
		firstPoll time.Time,
		identity string,
		requestID string,
	) error

	DescribeDeployment(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		seriesName string,
		buildID string,
	) (*deploymentpb.DeploymentInfo, error)

	GetCurrentDeployment(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		seriesName string,
	) (*deploymentpb.DeploymentInfo, error)

	ListDeployments(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		seriesName string,
		nextPageToken []byte,
	) ([]*deploymentpb.DeploymentListInfo, []byte, error)

	GetDeploymentReachability(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		seriesName string,
		buildID string,
	) (*workflowservice.GetDeploymentReachabilityResponse, error)

	SetCurrentDeployment(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		deployment *deploymentpb.Deployment,
		updateMetadata *deploymentpb.UpdateDeploymentMetadata,
		identity string,
		requestID string,
	) (*deploymentpb.DeploymentInfo, *deploymentpb.DeploymentInfo, error)

	// Only used internally by deployment workflow:
	StartDeploymentSeries(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		seriesName string,
		identity string,
		requestID string,
	) error

	// Only used internally by deployment series workflow:
	SyncDeploymentWorkflowFromSeries(
		ctx context.Context,
		namespaceEntry *namespace.Namespace,
		deployment *deploymentpb.Deployment,
		args *deploymentspb.SyncDeploymentStateArgs,
		identity string,
		requestID string,
	) (*deploymentspb.SyncDeploymentStateResponse, error)
}

func DeploymentStoreClientProvider

func DeploymentStoreClientProvider(
	logger log.Logger,
	historyClient resource.HistoryClient,
	visibilityManager manager.VisibilityManager,
	dc *dynamicconfig.Collection,
) DeploymentStoreClient

type DeploymentWorkflowRunner

type DeploymentWorkflowRunner struct {
	*deploymentspb.DeploymentWorkflowArgs
	// contains filtered or unexported fields
}

DeploymentWorkflowRunner holds the local state for a deployment workflow

type ErrMaxTaskQueuesInDeployment

type ErrMaxTaskQueuesInDeployment struct {
	// contains filtered or unexported fields
}

type ErrRegister

type ErrRegister struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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