Documentation
¶
Index ¶
- func DatabaseEngine(ctx context.Context, ch *cmdutil.Helper, database string) (ps.DatabaseEngine, error)
- func PrintList(ch *cmdutil.Helper, list live.ConnectionList, topology ListTopology) error
- func RunCancelQuery(ctx context.Context, ch *cmdutil.Helper, database, branch, queryID string, ...) error
- func RunCancelQueryForEngine(ctx context.Context, ch *cmdutil.Helper, database, branch, queryID string, ...) error
- func RunKillConnection(ctx context.Context, ch *cmdutil.Helper, database, branch, connectionID string, ...) error
- func RunKillConnectionForEngine(ctx context.Context, ch *cmdutil.Helper, database, branch, connectionID string, ...) error
- func RunKillTransaction(ctx context.Context, ch *cmdutil.Helper, ...) error
- func RunKillTransactionForEngine(ctx context.Context, ch *cmdutil.Helper, ...) error
- func RunList(ctx context.Context, ch *cmdutil.Helper, database, branch string, ...) error
- func TopCmd(ch *cmdutil.Helper) *cobra.Command
- func ValidateConnectionFilter(filter ConnectionFilter) error
- func ValidateConnectionID(id string) error
- func ValidateEngineFlags(engine ps.DatabaseEngine, filter ConnectionFilter, target ConnectionTarget) error
- func ValidateQueryID(id string) error
- func ValidateTransactionID(id string) error
- type ConnectionFilter
- type ConnectionTarget
- type ListTopology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseEngine ¶ added in v0.308.0
func DatabaseEngine(ctx context.Context, ch *cmdutil.Helper, database string) (ps.DatabaseEngine, error)
DatabaseEngine resolves the engine backing a database so connection commands can pick the Vitess or Postgres code path.
func PrintList ¶
func PrintList(ch *cmdutil.Helper, list live.ConnectionList, topology ListTopology) error
PrintList prints a live connection list in the configured CLI format.
func RunCancelQuery ¶
func RunCancelQuery(ctx context.Context, ch *cmdutil.Helper, database, branch, queryID string, target ConnectionTarget) error
RunCancelQuery cancels the active query identified by a live connection query ID.
func RunCancelQueryForEngine ¶
func RunCancelQueryForEngine(ctx context.Context, ch *cmdutil.Helper, database, branch, queryID string, engine ps.DatabaseEngine, target ConnectionTarget) error
RunCancelQueryForEngine cancels the active query and prints output for the resolved database engine.
func RunKillConnection ¶
func RunKillConnection(ctx context.Context, ch *cmdutil.Helper, database, branch, connectionID string, target ConnectionTarget) error
RunKillConnection terminates the connection identified by a live connection_id.
func RunKillConnectionForEngine ¶
func RunKillConnectionForEngine(ctx context.Context, ch *cmdutil.Helper, database, branch, connectionID string, engine ps.DatabaseEngine, target ConnectionTarget) error
RunKillConnectionForEngine terminates a connection and prints output for the resolved database engine.
func RunKillTransaction ¶
func RunKillTransaction(ctx context.Context, ch *cmdutil.Helper, database, branch, transactionID string, target ConnectionTarget) error
RunKillTransaction terminates the connection identified by a live connection transaction ID.
func RunKillTransactionForEngine ¶
func RunKillTransactionForEngine(ctx context.Context, ch *cmdutil.Helper, database, branch, transactionID string, engine ps.DatabaseEngine, target ConnectionTarget) error
RunKillTransactionForEngine terminates a transaction and prints output for the resolved database engine.
func RunList ¶
func RunList(ctx context.Context, ch *cmdutil.Helper, database, branch string, filter ConnectionFilter, target ConnectionTarget) error
RunList fetches and prints one live connection list.
func ValidateConnectionFilter ¶
func ValidateConnectionFilter(filter ConnectionFilter) error
ValidateConnectionFilter validates mutually exclusive live connection filters.
func ValidateConnectionID ¶
ValidateConnectionID checks the connection action identifier without making network calls.
func ValidateEngineFlags ¶
func ValidateEngineFlags(engine ps.DatabaseEngine, filter ConnectionFilter, target ConnectionTarget) error
ValidateEngineFlags rejects flags that only apply to another database engine.
func ValidateQueryID ¶
ValidateQueryID checks the query action identifier without making network calls.
func ValidateTransactionID ¶
ValidateTransactionID checks the transaction action identifier without making network calls.
Types ¶
type ConnectionFilter ¶
ConnectionFilter filters live connection rows by instance or instance role.
type ConnectionTarget ¶
ConnectionTarget identifies an optional Vitess target for connection commands.
type ListTopology ¶
type ListTopology struct {
Keyspace string `json:"keyspace,omitempty"`
Shard string `json:"shard,omitempty"`
Tablet string `json:"tablet,omitempty"`
}
ListTopology describes the Vitess tablet selected for a live connection list.