Documentation ¶
Index ¶
- Constants
- Variables
- func BuildQueryWithSeriesFilter(seriesName string) string
- func DecodeDeploymentMemo(memo *commonpb.Memo) *deploymentspb.DeploymentWorkflowMemo
- func DeploymentSeriesWorkflow(ctx workflow.Context, args *deploymentspb.DeploymentSeriesWorkflowArgs) error
- func DeploymentWorkflow(ctx workflow.Context, ...) error
- func GenerateDeploymentSeriesWorkflowID(deploymentSeriesName string) string
- func GenerateDeploymentWorkflowID(seriesName string, buildID string) string
- func GenerateDeploymentWorkflowIDForPatternMatching(seriesName string) string
- func NewResult(dc *dynamicconfig.Collection, params activityDeps) fxResult
- func ValidateDeploymentWfParams(fieldName string, field string, maxIDLengthLimit int) error
- type DeploymentActivities
- type DeploymentClientImpl
- func (d *DeploymentClientImpl) DescribeDeployment(ctx context.Context, namespaceEntry *namespace.Namespace, seriesName string, ...) (_ *deploymentpb.DeploymentInfo, retErr error)
- func (d *DeploymentClientImpl) GetCurrentDeployment(ctx context.Context, namespaceEntry *namespace.Namespace, seriesName string) (_ *deploymentpb.DeploymentInfo, retErr error)
- func (d *DeploymentClientImpl) GetDeploymentReachability(ctx context.Context, namespaceEntry *namespace.Namespace, seriesName string, ...) (_ *workflowservice.GetDeploymentReachabilityResponse, retErr error)
- func (d *DeploymentClientImpl) ListDeployments(ctx context.Context, namespaceEntry *namespace.Namespace, seriesName string, ...) (_ []*deploymentpb.DeploymentListInfo, _ []byte, retErr error)
- func (d *DeploymentClientImpl) RegisterTaskQueueWorker(ctx context.Context, namespaceEntry *namespace.Namespace, ...) (retErr error)
- func (d *DeploymentClientImpl) SetCurrentDeployment(ctx context.Context, namespaceEntry *namespace.Namespace, ...) (_ *deploymentpb.DeploymentInfo, _ *deploymentpb.DeploymentInfo, retErr error)
- func (d *DeploymentClientImpl) StartDeploymentSeries(ctx context.Context, namespaceEntry *namespace.Namespace, seriesName string, ...) (retErr error)
- func (d *DeploymentClientImpl) SyncDeploymentWorkflowFromSeries(ctx context.Context, namespaceEntry *namespace.Namespace, ...) (_ *deploymentspb.SyncDeploymentStateResponse, retErr error)
- type DeploymentSeriesActivities
- type DeploymentSeriesWorkflowRunner
- type DeploymentStoreClient
- type DeploymentWorkflowRunner
- type ErrMaxTaskQueuesInDeployment
- type ErrRegister
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 ¶
View Source
var ( DeploymentVisibilityBaseListQuery = fmt.Sprintf( "%s = '%s' AND %s = '%s' AND %s = '%s'", searchattribute.WorkflowType, DeploymentWorkflowType, searchattribute.TemporalNamespaceDivision, DeploymentNamespaceDivision, searchattribute.ExecutionStatus, enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING.String(), ) )
View Source
var Module = fx.Options( fx.Provide(NewResult), fx.Provide(DeploymentStoreClientProvider), )
Functions ¶
func BuildQueryWithSeriesFilter ¶
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 DeploymentSeriesWorkflow ¶
func DeploymentSeriesWorkflow(ctx workflow.Context, args *deploymentspb.DeploymentSeriesWorkflowArgs) error
func DeploymentWorkflow ¶
func DeploymentWorkflow(ctx workflow.Context, deploymentWorkflowArgs *deploymentspb.DeploymentWorkflowArgs) error
func GenerateDeploymentWorkflowID ¶
GenerateDeploymentWorkflowID is a helper that generates a system accepted workflowID which are used in our deployment workflows
func NewResult ¶
func NewResult( dc *dynamicconfig.Collection, params activityDeps, ) fxResult
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 ¶
func (a *DeploymentActivities) SyncUserData(ctx context.Context, input *deploymentspb.SyncUserDataRequest) error
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 (*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
}
func (*DeploymentSeriesActivities) SyncDeployment ¶
func (a *DeploymentSeriesActivities) SyncDeployment(ctx context.Context, args *deploymentspb.SyncDeploymentStateActivityArgs) (*deploymentspb.SyncDeploymentStateActivityResult, error)
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
}
Click to show internal directories.
Click to hide internal directories.