Documentation ¶
Index ¶
- Constants
- func GetDomainsActivity(ctx context.Context, params *GetDomainsActivityParams) ([]string, error)
- type BootstrapParams
- type Config
- type FailoverActivityParams
- type FailoverActivityResult
- type FailoverManager
- type FailoverParams
- type FailoverResult
- type GetDomainsActivityParams
- type QueryResult
Constants ¶
View Source
const ( // TaskListName tasklist TaskListName = "cadence-sys-failoverManager-tasklist" // WorkflowTypeName workflow type name WorkflowTypeName = "cadence-sys-failoverManager-workflow" // WorkflowID will be reused to ensure only one workflow running WorkflowID = "cadence-failover-manager" // QueryType for failover workflow QueryType = "state" // PauseSignal signal name for pause PauseSignal = "pause" // ResumeSignal signal name for resume ResumeSignal = "resume" // WorkflowRunning state WorkflowRunning = "running" // WorkflowPaused state WorkflowPaused = "paused" // WorkflowCompleted state WorkflowCompleted = "complete" // WorkflowAborted state WorkflowAborted = "aborted" )
Variables ¶
This section is empty.
Functions ¶
func GetDomainsActivity ¶
func GetDomainsActivity(ctx context.Context, params *GetDomainsActivityParams) ([]string, error)
GetDomainsActivity activity def
Types ¶
type BootstrapParams ¶
type BootstrapParams struct { // Config contains the configuration for scanner Config Config // ServiceClient is an instance of cadence service client ServiceClient workflowserviceclient.Interface // MetricsClient is an instance of metrics object for emitting stats MetricsClient metrics.Client Logger log.Logger // TallyScope is an instance of tally metrics scope TallyScope tally.Scope // ClientBean is an instance of client.Bean for a collection of clients ClientBean client.Bean }
BootstrapParams contains the set of params needed to bootstrap failover manager
type Config ¶
type Config struct { AdminOperationToken dynamicconfig.StringPropertyFn // ClusterMetadata contains the metadata for this cluster ClusterMetadata cluster.Metadata }
Config defines the configuration for failover
type FailoverActivityParams ¶
FailoverActivityParams params for activity
type FailoverActivityResult ¶
FailoverActivityResult result for failover activity
func FailoverActivity ¶
func FailoverActivity(ctx context.Context, params *FailoverActivityParams) (*FailoverActivityResult, error)
FailoverActivity activity def
type FailoverManager ¶
type FailoverManager struct {
// contains filtered or unexported fields
}
FailoverManager of cadence worker service
func New ¶
func New(params *BootstrapParams) *FailoverManager
New returns a new instance of FailoverManager
type FailoverParams ¶
type FailoverParams struct { // TargetCluster is the destination of failover TargetCluster string // SourceCluster is from which cluster the domains are active before failover SourceCluster string // BatchFailoverSize is number of domains to failover in one batch BatchFailoverSize int // BatchFailoverWaitTimeInSeconds is the waiting time between batch failover BatchFailoverWaitTimeInSeconds int // Domains candidates to be failover Domains []string }
FailoverParams is the arg for failoverWorkflow
type FailoverResult ¶
FailoverResult is workflow result
func FailoverWorkflow ¶
func FailoverWorkflow(ctx workflow.Context, params *FailoverParams) (*FailoverResult, error)
FailoverWorkflow is the workflow that managed failover all domains with IsManagedByCadence=true
type GetDomainsActivityParams ¶
GetDomainsActivityParams params for activity
type QueryResult ¶
type QueryResult struct { TotalDomains int Success int Failed int State string TargetCluster string SourceCluster string SuccessDomains []string // SuccessDomains are guaranteed succeed processed FailedDomains []string // FailedDomains contains false positive Operator string }
QueryResult for failover progress
Click to show internal directories.
Click to hide internal directories.