cmd

package
v0.5.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 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 supported Control Plane version (decided 2026-08-05; dev-snapshot version mislabeling is why a floor exists). It must match openapi/SOURCE's CP_TAG pin, the revision the spec is vendored from; TestControlplaneSupportFloorMatchesSource enforces it.

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