vitess.io/vitess@v0.16.2/go/vt/vtctl/workflow/state.go (about)

     1  /*
     2  Copyright 2021 The Vitess Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8  	http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package workflow
    18  
    19  // Type is the type of a workflow.
    20  type Type string
    21  
    22  // Workflow types.
    23  const (
    24  	TypeReshard    Type = "Reshard"
    25  	TypeMoveTables Type = "MoveTables"
    26  )
    27  
    28  // State represents the state of a workflow.
    29  type State struct {
    30  	Workflow       string
    31  	SourceKeyspace string
    32  	TargetKeyspace string
    33  	WorkflowType   Type
    34  
    35  	ReplicaCellsSwitched    []string
    36  	ReplicaCellsNotSwitched []string
    37  
    38  	RdonlyCellsSwitched    []string
    39  	RdonlyCellsNotSwitched []string
    40  
    41  	WritesSwitched bool
    42  
    43  	// Partial MoveTables info
    44  	IsPartialMigration    bool
    45  	ShardsAlreadySwitched []string
    46  	ShardsNotYetSwitched  []string
    47  }