run

package
v0.0.0-...-2560486 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package run provides Cobra commands to execute PPM

Index

Constants

View Source
const (
	InvalidConfigurationExitCode         = 1
	InternalErrorExitCode                = 2
	DatabaseErrorExitCode                = 3
	PartitionsProvisioningFailedExitCode = 4
	PartitionsCheckFailedExitCode        = 5
	PartitionsCleanupFailedExitCode      = 6
	InvalidDateExitCode                  = 7
)

Variables

View Source
var AllCmd = &cobra.Command{
	Use:   "all",
	Short: "Perform partitions provisioning, cleanup, and check",
	Long:  "Perform partitions provisioning, cleanup, and check",
	Run: func(cmd *cobra.Command, args []string) {
		client := initCmd()

		provisioningCmd(client)
		cleanupCmd(client)
		checkCmd(client)
	},
}
View Source
var CheckCmd = &cobra.Command{
	Use:   "check",
	Short: "Check existing partitions",
	Long:  "Check existing partitions",
	Run: func(cmd *cobra.Command, args []string) {
		client := initCmd()
		checkCmd(client)
	},
}
View Source
var CleanupCmd = &cobra.Command{
	Use:   "cleanup",
	Short: "Remove outdated partitions",
	Long:  "Remove outdated partitions",
	Run: func(cmd *cobra.Command, args []string) {
		client := initCmd()
		cleanupCmd(client)
	},
}
View Source
var ErrUnsupportedPostgreSQLVersion = errors.New("unsupported PostgreSQL version")
View Source
var ProvisioningCmd = &cobra.Command{
	Use:   "provisioning",
	Short: "Create and attach new partitions",
	Long:  "Create and attach new partitions",
	Run: func(cmd *cobra.Command, args []string) {
		client := initCmd()
		provisioningCmd(client)
	},
}

Functions

func RunCmd

func RunCmd() *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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