go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/vtctl Index | Files | Directories

package vtctl

import "gopkg.in/src-d/go-vitess.v1/vt/vtctl"

Package vtctl contains the implementation of all the Vitess management commands.

Index

Package Files

backup.go cell_info.go cells_aliases.go plugin_consultopo.go plugin_etcd2topo.go plugin_zk2topo.go query.go reparent.go throttler.go topo.go vtctl.go workflow.go

Variables

var (
    HealthCheckTopologyRefresh = flag.Duration("vtctl_healthcheck_topology_refresh", 30*time.Second, "refresh interval for re-reading the topology")
    HealthcheckRetryDelay      = flag.Duration("vtctl_healthcheck_retry_delay", 5*time.Second, "delay before retrying a failed healthcheck")
    HealthCheckTimeout         = flag.Duration("vtctl_healthcheck_timeout", time.Minute, "the health check timeout period")
)

Flags are exported for use in go/vt/vtctld.

var (
    // ErrUnknownCommand is returned for an unknown command
    ErrUnknownCommand = errors.New("unknown command")
)
var (
    // WorkflowManager contains our manager. It needs to be set or else all
    // commands will be disabled.
    WorkflowManager *workflow.Manager
)

func DecodeContent Uses

func DecodeContent(filename string, data []byte, json bool) (string, error)

DecodeContent uses the filename to imply a type, and proto-decodes the right object, then echoes it as a string.

func MarshalJSON Uses

func MarshalJSON(obj interface{}) (data []byte, err error)

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 PrintAllCommands Uses

func PrintAllCommands(logger logutil.Logger)

PrintAllCommands will print the list of commands to the logger

func RunCommand Uses

func RunCommand(ctx context.Context, wr *wrangler.Wrangler, args []string) error

RunCommand will execute the command using the provided wrangler. It will return the actionPath to wait on for long remote actions if applicable.

type JsonTopologyDecoder Uses

type JsonTopologyDecoder struct{}

type PlainTopologyDecoder Uses

type PlainTopologyDecoder struct{}

type ProtoTopologyDecoder Uses

type ProtoTopologyDecoder struct{}

type TopologyDecoder Uses

type TopologyDecoder interface {
    // contains filtered or unexported methods
}

Directories

PathSynopsis
fakevtctlclientPackage fakevtctlclient contains a fake for the vtctlclient interface.
grpcvtctlclientPackage grpcvtctlclient contains the gRPC version of the vtctl client protocol
grpcvtctlserverPackage grpcvtctlserver contains the gRPC implementation of the server side of the remote execution of vtctl commands.
vtctlclientPackage vtctlclient contains the generic client side of the remote vtctl protocol.
vtctlclienttestPackage vtctlclienttest contains the testsuite against which each RPC implementation of the vtctlclient interface must be tested.

Package vtctl imports 49 packages (graph) and is imported by 6 packages. Updated 2019-06-05. Refresh now. Tools for package owners.