Documentation ¶
Overview ¶
Package vtctldclient contains the generic client side of the remote vtctld protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory func(addr string) (VtctldClient, error)
Factory is a function that creates new VtctldClients.
type VtctldClient ¶
type VtctldClient interface { vtctlservicepb.VtctldClient // Close augments the vtctlservicepb.VtctlClient interface with io.Closer. Close() error }
func New ¶
func New(protocol string, addr string) (VtctldClient, error)
New returns a VtctldClient for the given protocol, connected to a VtctldServer on the given addr. This function returns an error if no client factory was registered for the given protocol.
This is a departure from vtctlclient's New, which relies on a flag in the global namespace to determine the protocol to use. Instead, we require users to specify their own flag in their own (hopefully not global) namespace to determine the protocol to pass into here.
Click to show internal directories.
Click to hide internal directories.