vtctlclient

package
v0.0.0-...-d271c08 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2014 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

vtctlclient contains the generic client side of the remote vtctl protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterVtctlClientFactory

func RegisterVtctlClientFactory(name string, factory VtctlClientFactory)

RegisterVtctlClientFactory allows a client implementation to register itself

Types

type ErrFunc

type ErrFunc func() error

ErrFunc is returned by streaming queries to get the error

type VtctlClient

type VtctlClient interface {
	// ExecuteVtctlCommand will execute the command remotely
	ExecuteVtctlCommand(args []string, actionTimeout, lockTimeout time.Duration) (<-chan *logutil.LoggerEvent, ErrFunc)

	// Close will terminate the connection. This object won't be
	// used after this.
	Close()
}

VtctlClient defines the interface used to send remote vtctl commands

func New

func New(addr string, dialTimeout time.Duration) (VtctlClient, error)

New allows a user of the client library to get its implementation.

type VtctlClientFactory

type VtctlClientFactory func(addr string, dialTimeout time.Duration) (VtctlClient, error)

VtctlClientFactory are registered by client implementations

Jump to

Keyboard shortcuts

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