Documentation ¶
Overview ¶
Package psql implements the `kubectl cnpg psql` command
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶ added in v1.21.4
type Command struct { CommandOptions // contains filtered or unexported fields }
Command is the launcher of `psql` with `kubectl exec`
func NewCommand ¶ added in v1.21.4
func NewCommand( ctx context.Context, options CommandOptions, ) (*Command, error)
NewCommand creates a new psql command
func (*Command) Exec ¶ added in v1.21.4
Exec replaces the current process with a `kubectl Exec` invocation. This function won't return
type CommandOptions ¶ added in v1.21.4
type CommandOptions struct { // Require a connection to a Replica Replica bool // The cluster Name Name string // The Namespace where we're working in Namespace string // Whether we should we allocate a TTY for psql AllocateTTY bool // Whether we should we pass stdin to psql PassStdin bool // Arguments to pass to psql Args []string }
CommandOptions are the options required to start psql
type ErrMissingPod ¶
type ErrMissingPod struct {
// contains filtered or unexported fields
}
ErrMissingPod is raised when we can't find a Pod having the desired role
func (*ErrMissingPod) Error ¶
func (err *ErrMissingPod) Error() string
Error implements the error interface
Click to show internal directories.
Click to hide internal directories.