common

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxReplicationLagDefault = 30 * time.Second
	TimeoutDefault           = 30 * time.Second

	BaseOptions = struct {
		Workflow       string
		TargetKeyspace string
		Format         string
	}{}

	CreateOptions = struct {
		Cells                        []string
		AllCells                     bool
		TabletTypes                  []topodatapb.TabletType
		TabletTypesInPreferenceOrder bool
		OnDDL                        string
		DeferSecondaryKeys           bool
		AutoStart                    bool
		StopAfterCopy                bool
	}{}
)
View Source
var CancelOptions = struct {
	KeepData         bool
	KeepRoutingRules bool
}{}
View Source
var CompleteOptions = struct {
	KeepData         bool
	KeepRoutingRules bool
	RenameTables     bool
	DryRun           bool
}{}
View Source
var SwitchTrafficOptions = struct {
	Cells                     []string
	TabletTypes               []topodatapb.TabletType
	Timeout                   time.Duration
	MaxReplicationLagAllowed  time.Duration
	EnableReverseReplication  bool
	DryRun                    bool
	Direction                 workflow.TrafficSwitchDirection
	InitializeTargetSequences bool
}{}

Functions

func AddCommonCreateFlags

func AddCommonCreateFlags(cmd *cobra.Command)

func AddCommonFlags

func AddCommonFlags(cmd *cobra.Command)

func AddCommonSwitchTrafficFlags

func AddCommonSwitchTrafficFlags(cmd *cobra.Command, initializeTargetSequences bool)

func CanRestartWorkflow

func CanRestartWorkflow(keyspace, workflow string) error

CanRestartWorkflow validates that, for an atomic copy workflow, none of the streams are still in the copy phase. Since we copy all tables in a single snapshot, we cannot restart a workflow which broke before all tables were copied.

func GetCancelCommand

func GetCancelCommand(opts *SubCommandsOpts) *cobra.Command

func GetClient

func GetClient() vtctldclient.VtctldClient

func GetCommandCtx

func GetCommandCtx() context.Context

func GetCompleteCommand

func GetCompleteCommand(opts *SubCommandsOpts) *cobra.Command

func GetOutputFormat

func GetOutputFormat(cmd *cobra.Command) (string, error)

func GetReverseTrafficCommand

func GetReverseTrafficCommand(opts *SubCommandsOpts) *cobra.Command

func GetShowCommand

func GetShowCommand(opts *SubCommandsOpts) *cobra.Command

func GetStartCommand

func GetStartCommand(opts *SubCommandsOpts) *cobra.Command

func GetStatusCommand

func GetStatusCommand(opts *SubCommandsOpts) *cobra.Command

func GetStopCommand

func GetStopCommand(opts *SubCommandsOpts) *cobra.Command

func GetSwitchTrafficCommand

func GetSwitchTrafficCommand(opts *SubCommandsOpts) *cobra.Command

func OutputStatusResponse

func OutputStatusResponse(resp *vtctldatapb.WorkflowStatusResponse, format string) error

func ParseAndValidateCreateOptions

func ParseAndValidateCreateOptions(cmd *cobra.Command) error

func ParseCells

func ParseCells(cmd *cobra.Command) error

func ParseTabletTypes

func ParseTabletTypes(cmd *cobra.Command) error

func RegisterCommandHandler

func RegisterCommandHandler(command string, handler func(cmd *cobra.Command))

func RegisterCommands

func RegisterCommands(root *cobra.Command)

func SetClient

func SetClient(c vtctldclient.VtctldClient)

func SetCommandCtx

func SetCommandCtx(ctx context.Context)

Types

type SubCommandsOpts

type SubCommandsOpts struct {
	SubCommand string
	Workflow   string // Used to specify an example workflow name for the Examples section of the help output.
}

Jump to

Keyboard shortcuts

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