vtctl

package
v2.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2017 License: BSD-3-Clause Imports: 50 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var (
	// DisableActiveReparents is a flag to disable active
	// reparents for safety reasons. It is used in two places:
	// 1. in this file to skip registering the commands.
	// 2. in vtctld so it can be exported to the UI (different
	// package, that's why it's exported). That way we can disable
	// menu items there, using features.
	DisableActiveReparents = flag.Bool("disable_active_reparents", false, "if set, do not allow active reparents. Use this to protect a cluster using external reparents.")
)
View Source
var (
	// ErrUnknownCommand is returned for an unknown command
	ErrUnknownCommand = errors.New("unknown command")
)
View Source
var (
	// WorkflowManager contains our manager. It needs to be set before
	// servenv.Run is called, or this command group will be disabled.
	WorkflowManager *workflow.Manager
)

Functions

func MarshalJSON

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

func PrintAllCommands(logger logutil.Logger)

PrintAllCommands will print the list of commands to the logger

func RunCommand

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.

Types

This section is empty.

Directories

Path Synopsis
Package fakevtctlclient contains a fake for the vtctlclient interface.
Package fakevtctlclient contains a fake for the vtctlclient interface.
Package grpcvtctlclient contains the gRPC version of the vtctl client protocol
Package grpcvtctlclient contains the gRPC version of the vtctl client protocol
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.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL