Documentation ¶
Overview ¶
Package vtctl contains the implementation of all the Vitess management commands.
Index ¶
- Variables
- func MarshalJSON(obj any) (data []byte, err error)
- func NewHealthCheck(ctx context.Context, ts *topo.Server, local string, cellsToWatch []string) discovery.HealthCheck
- func PrintAllCommands(logger logutil.Logger)
- func PrintDoubleDashDeprecationNotice(wr *wrangler.Wrangler)
- func RunCommand(ctx context.Context, wr *wrangler.Wrangler, args []string) error
- type JSONTopologyDecoder
- type PlainTopologyDecoder
- type ProtoTopologyDecoder
- type TopologyDecoder
- type VDiffListing
- type VReplicationWorkflowAction
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknownCommand is returned for an unknown command ErrUnknownCommand = errors.New("unknown command") )
Functions ¶
func MarshalJSON ¶
MarshalJSON marshals "obj" to a JSON string. It uses the "jsonpb" marshaler or Go's standard one.
We use jsonpb for protobuf messages because it is the only supported way to marshal protobuf messages to JSON. In addition to that, it's the only way to emit zero values in the JSON output. Unfortunately, jsonpb works only for protobuf messages. Therefore, we use the default marshaler for the remaining structs (which are possibly mixed protobuf and non-protobuf).
TODO(mberlin): Switch "EnumAsInts" to "false" once the frontend is
updated and mixed types will use jsonpb as well.
func NewHealthCheck ¶ added in v0.16.0
func NewHealthCheck(ctx context.Context, ts *topo.Server, local string, cellsToWatch []string) discovery.HealthCheck
NewHealthCheck returns a healthcheck implementation based on the vtctl flags. It is exported for use in go/vt/vtctld.
func PrintAllCommands ¶
PrintAllCommands will print the list of commands to the logger
func PrintDoubleDashDeprecationNotice ¶ added in v0.15.0
Types ¶
type JSONTopologyDecoder ¶ added in v0.10.0
type JSONTopologyDecoder struct{}
JSONTopologyDecoder exports topo node as JSON
type PlainTopologyDecoder ¶
type PlainTopologyDecoder struct{}
PlainTopologyDecoder exports topo node as plain text
type ProtoTopologyDecoder ¶
type ProtoTopologyDecoder struct{}
ProtoTopologyDecoder exports topo node as a proto
type TopologyDecoder ¶
type TopologyDecoder interface {
// contains filtered or unexported methods
}
TopologyDecoder interface for exporting out a leaf node in a readable form
type VDiffListing ¶ added in v0.14.0
type VDiffListing struct {
UUID, Workflow, Keyspace, Shard, State string
}
func (*VDiffListing) String ¶ added in v0.14.0
func (vdl *VDiffListing) String() string
type VReplicationWorkflowAction ¶ added in v0.9.0
type VReplicationWorkflowAction string
VReplicationWorkflowAction defines subcommands passed to vtctl for movetables or reshard
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package fakevtctlclient contains a fake for the vtctlclient interface.
|
Package fakevtctlclient contains a fake for the vtctlclient interface. |
Package grpcclientcommon defines the flags shared by both grpcvtctlclient and grpcvtctldclient.
|
Package grpcclientcommon defines the flags shared by both grpcvtctlclient and grpcvtctldclient. |
Package grpcvtctlclient contains the gRPC version of the vtctl client protocol
|
Package grpcvtctlclient contains the gRPC version of the vtctl client protocol |
Package grpcvtctldclient contains the gRPC version of the vtctld client protocol.
|
Package grpcvtctldclient contains the gRPC version of the vtctld client protocol. |
testutil
Package testutil contains utility functions for writing tests for the grpcvtctldserver.
|
Package testutil contains utility functions for writing tests for the grpcvtctldserver. |
Package grpcvtctlserver contains the gRPC implementation of the server side of the remote execution of vtctl commands.
|
Package grpcvtctlserver contains the gRPC implementation of the server side of the remote execution of vtctl commands. |
internal
|
|
reparenttestutil
Package reparenttestutil contains utility functions for writing tests
|
Package reparenttestutil contains utility functions for writing tests |
Package vtctlclient contains the generic client side of the remote vtctl protocol.
|
Package vtctlclient contains the generic client side of the remote vtctl protocol. |
Package vtctlclienttest contains the testsuite against which each RPC implementation of the vtctlclient interface must be tested.
|
Package vtctlclienttest contains the testsuite against which each RPC implementation of the vtctlclient interface must be tested. |
Package vtctldclient contains the generic client side of the remote vtctld protocol.
|
Package vtctldclient contains the generic client side of the remote vtctld protocol. |
Package workflow defines types and functions for working with Vitess workflows.
|
Package workflow defines types and functions for working with Vitess workflows. |