cmd

package
v0.5.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: PostgreSQL Imports: 32 Imported by: 0

Documentation

Overview

Package cmd wires the pgEdge Control Plane command tree: the module root, its persistent connection flags, and the HTTP API client shared by every resource command.

Index

Constants

View Source
const (
	ExitOK       = 0
	ExitGeneral  = 1
	ExitUsage    = 2
	ExitTimeout  = 3
	ExitNotFound = 4
	ExitAuth     = 5
)

Exit codes used by controlplane commands.

View Source
const SupportFloor = "0.10.0"

SupportFloor is THE minimum Control Plane server version this CLI module supports (decision 2026-08-05; issue #34's dev-snapshot mislabeling is why the policy exists at all). It must be kept in sync with the `CP_TAG=` pin in openapi/SOURCE — that file is what `make vendor-spec` actually vendors from, and this constant is what the running binary compares against. TestControlplaneSupportFloorMatchesSource (internal/clitest) parses SOURCE's pin and fails the build the two drift apart, so bump both together.

Variables

This section is empty.

Functions

func NewClusterCmd

func NewClusterCmd(rt *module.Runtime) *cobra.Command

NewClusterCmd builds `pgedge controlplane cluster`.

func NewControlplaneCmd

func NewControlplaneCmd(rt *module.Runtime) *cobra.Command

NewControlplaneCmd builds the `pgedge controlplane` command tree: the module root, its persistent connection flags, and the resource subcommands.

func NewDatabaseCmd

func NewDatabaseCmd(rt *module.Runtime) *cobra.Command

NewDatabaseCmd builds `pgedge controlplane database`.

func NewDatabaseInstanceCmd

func NewDatabaseInstanceCmd(rt *module.Runtime) *cobra.Command

NewDatabaseInstanceCmd builds `pgedge controlplane database instance`: lifecycle control of individual database instances.

func NewDatabaseNodeCmd

func NewDatabaseNodeCmd(rt *module.Runtime) *cobra.Command

NewDatabaseNodeCmd builds `pgedge controlplane database node`: per-node operations (backup, switchover, failover) on a database.

func NewHostCmd

func NewHostCmd(rt *module.Runtime) *cobra.Command

NewHostCmd builds `pgedge controlplane host`.

func NewTaskCmd

func NewTaskCmd(rt *module.Runtime) *cobra.Command

NewTaskCmd builds `pgedge controlplane task`.

Types

type ExitError

type ExitError struct {
	// contains filtered or unexported fields
}

ExitError carries a message and a process exit code. Exported so main.go can extract the code via the cli.coder interface.

func (*ExitError) Code

func (e *ExitError) Code() int

func (*ExitError) Error

func (e *ExitError) Error() string

Jump to

Keyboard shortcuts

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