MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / Exec

Method Exec

internal/cmd/plugin/psql/psql.go:164–176  ·  view source on GitHub ↗

Exec invokes `kubectl exec` and transfers control to it. This function does not return on success.

()

Source from the content-addressed store, hash-verified

162// Exec invokes `kubectl exec` and transfers control to it.
163// This function does not return on success.
164func (psql *Command) Exec() error {
165 kubectlExec, err := psql.getKubectlInvocation()
166 if err != nil {
167 return err
168 }
169
170 err = execKubectl(psql.kubectlPath, kubectlExec)
171 if err != nil {
172 return err
173 }
174
175 return nil
176}
177
178// Run starts a psql process inside the target pod
179func (psql *Command) Run() error {

Callers 15

NewCmdFunction · 0.95
PromoteAndWaitMethod · 0.80
ConfigureNewInstanceMethod · 0.80
DropConnectionsMethod · 0.80
shipWalFileMethod · 0.80
DisableSuperuserPasswordFunction · 0.80
importRoleInheritanceMethod · 0.80
importDatabaseContentMethod · 0.80
analyzeMethod · 0.80
importRolesMethod · 0.80
createMonitoringTxFunction · 0.80

Calls 2

getKubectlInvocationMethod · 0.95
execKubectlFunction · 0.70

Tested by

no test coverage detected