Documentation ¶
Index ¶
- Variables
- func ApplyDataMigrationScriptSubDir(gphome string, port int, scriptDirFS fs.FS, scriptDir string, bar *mpb.Bar) ([]byte, error)
- func ApplyDataMigrationScripts(streams step.OutStreams, nonInteractive bool, gphome string, port int, ...) error
- func ApplyDataMigrationScriptsPrompt(nonInteractive bool, reader *bufio.Reader, currentScriptDir string, ...) ([]string, error)
- func ApplySQLFile(gphome string, port int, database string, path string, args ...string) ([]byte, error)
- func ArchiveDataMigrationScriptsPrompt(streams step.OutStreams, nonInteractive bool, reader *bufio.Reader, ...) error
- func CreateStateDir() (err error)
- func Execute(client idl.CliToHubClient, request *idl.ExecuteRequest, verbose bool) (*idl.ExecuteResponse, error)
- func Finalize(client idl.CliToHubClient, verbose bool) (*idl.FinalizeResponse, error)
- func Format(description string, status idl.Status) string
- func FormatStatus(status *idl.SubstepStatus) string
- func GenerateDataMigrationScripts(streams step.OutStreams, nonInteractive bool, gphome string, port int, ...) error
- func GenerateScriptsPerDatabase(streams step.OutStreams, database DatabaseInfo, gphome string, port int, ...) error
- func GenerateScriptsPerPhase(phase idl.Step, database DatabaseInfo, gphome string, port int, seedDir string, ...) error
- func Initialize(client idl.CliToHubClient, request *idl.InitializeRequest, verbose bool) (err error)
- func InitializeCreateCluster(client idl.CliToHubClient, request *idl.InitializeCreateClusterRequest, ...) (*idl.InitializeResponse, error)
- func IsHubRunning() (bool, error)
- func ResetBashCommand()
- func ResetBootstrapConnectionFunction()
- func ResetPsqlCommand()
- func ResetPsqlFileCommand()
- func Revert(client idl.CliToHubClient, verbose bool) (*idl.RevertResponse, error)
- func SelectDataMigrationScriptsPrompt(reader *bufio.Reader, currentScriptDir string, currentScriptDirFS fs.FS, ...) ([]string, error)
- func SetBashCommand(command exectest.Command)
- func SetBootstrapConnectionFunction(...)
- func SetPsqlCommand(command exectest.Command)
- func SetPsqlFileCommand(command exectest.Command)
- func StartHub(streams step.OutStreams) (err error)
- func UILoop(stream receiver, verbose bool) (*idl.Response, error)
- type DatabaseInfo
- type Script
- type Scripts
Constants ¶
This section is empty.
Variables ¶
View Source
var MigrationScriptPhases = []idl.Step{idl.Step_initialize, idl.Step_finalize, idl.Step_revert, idl.Step_stats}
Functions ¶
func ApplySQLFile ¶
func CreateStateDir ¶
func CreateStateDir() (err error)
CreateStateDir creates the state directory in the cli to ensure that at most one gpupgrade is occurring at the same time.
func Execute ¶
func Execute(client idl.CliToHubClient, request *idl.ExecuteRequest, verbose bool) (*idl.ExecuteResponse, error)
func Finalize ¶
func Finalize(client idl.CliToHubClient, verbose bool) (*idl.FinalizeResponse, error)
func Format ¶
Format is also exported for ease of testing (see FormatStatus). Use NewSubstep instead.
func FormatStatus ¶
func FormatStatus(status *idl.SubstepStatus) string
FormatStatus returns a status string based on the upgrade status message. It's exported for ease of testing.
FormatStatus panics if it doesn't have a string representation for a given protobuf code.
func GenerateScriptsPerDatabase ¶
func GenerateScriptsPerDatabase(streams step.OutStreams, database DatabaseInfo, gphome string, port int, seedDir string, outputDir string, bar *mpb.Bar) error
func GenerateScriptsPerPhase ¶
func Initialize ¶
func Initialize(client idl.CliToHubClient, request *idl.InitializeRequest, verbose bool) (err error)
func InitializeCreateCluster ¶
func InitializeCreateCluster(client idl.CliToHubClient, request *idl.InitializeCreateClusterRequest, verbose bool) (*idl.InitializeResponse, error)
func IsHubRunning ¶
func ResetBashCommand ¶
func ResetBashCommand()
func ResetBootstrapConnectionFunction ¶
func ResetBootstrapConnectionFunction()
XXX: for internal testing only
func ResetPsqlCommand ¶
func ResetPsqlCommand()
func ResetPsqlFileCommand ¶
func ResetPsqlFileCommand()
func Revert ¶
func Revert(client idl.CliToHubClient, verbose bool) (*idl.RevertResponse, error)
func SetBashCommand ¶
func SetBootstrapConnectionFunction ¶
func SetBootstrapConnectionFunction(connectionFunc func(destination idl.ClusterDestination, gphome string, port int) (*sql.DB, error))
XXX: for internal testing only
func SetPsqlCommand ¶
func SetPsqlFileCommand ¶
func StartHub ¶
func StartHub(streams step.OutStreams) (err error)
Types ¶
type DatabaseInfo ¶
func GetDatabases ¶
Click to show internal directories.
Click to hide internal directories.