checkmigrate

package
v0.0.0-...-cb08592 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Used for synchronizing DoCleanup.  In DoInit() we increment the group
	// and then wait for at least one DoCleanup to finish, either in DoTeardown
	// or the signal handler.
	CleanupGroup *sync.WaitGroup
)

Non-flag variables

Functions

func CreateConnections

func CreateConnections() error

We kind of replicate NewDBConnFromEnvironment(), but as we have host/port/user flags we need to do their checking and assignment here.

func DoCheckMigrate

func DoCheckMigrate()

func DoCleanup

func DoCleanup(didCheckmigrateFail bool)

func DoFlagValidation

func DoFlagValidation(cmd *cobra.Command)

This function handles argument parsing and validation, e.g. checking that a passed filename exists. It should only validate; initialization with any sort of side effects should go in DoInit or DoSetup.

func DoInit

func DoInit(cmd *cobra.Command)

This function handles setup that can be done before parsing flags.

func DoSetup

func DoSetup() error

This function handles setup that must be done after parsing flags.

func DoTeardown

func DoTeardown()

func FlagChanged

func FlagChanged(flagName string) bool

Util functions to enable ease of access to global flag values

func GetShouldScrapeDatabaseNames

func GetShouldScrapeDatabaseNames() bool

func GetSourceConnection

func GetSourceConnection() *dbconn.DBConn

func GetTargetConnection

func GetTargetConnection() *dbconn.DBConn

func GetVersion

func GetVersion() string

Getter functions

func MustGetFlagBool

func MustGetFlagBool(flagName string) bool

func MustGetFlagString

func MustGetFlagString(flagName string) string

func ResetGlobalState

func ResetGlobalState()

ResetGlobalState() clears the global variables before each test

func SetCmdFlags

func SetCmdFlags(flagSet *pflag.FlagSet)

Setter functions

func SetCreateDBConn

func SetCreateDBConn(f func(dbName, username, host string, port int) *dbconn.DBConn)

func SetLoggerVerbosity

func SetLoggerVerbosity()

func SetVersion

func SetVersion(v string)

func ValidateFlagCombinations

func ValidateFlagCombinations(flags *pflag.FlagSet)

Types

This section is empty.

Jump to

Keyboard shortcuts

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