client

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package client provides a client implementation to control an etcd-agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	ID() uint64
	// Start starts a new etcd with the given args on the agent machine.
	Start(args ...string) (int, error)
	// Stop stops the existing etcd the agent started.
	Stop() error
	// Restart restarts the existing etcd the agent stopped.
	Restart() (int, error)
	// Cleanup stops the exiting etcd the agent started, then archives log and its data dir.
	Cleanup() error
	// Terminate stops the exiting etcd the agent started and removes its data dir.
	Terminate() error
	// DropPort drops all network packets at the given port.
	DropPort(port int) error
	// RecoverPort stops dropping all network packets at the given port.
	RecoverPort(port int) error
	// SetLatency slows down network by introducing latency.
	SetLatency(ms, rv int) error
	// RemoveLatency removes latency introduced by SetLatency.
	RemoveLatency() error
	// Status returns the status of etcd on the agent
	Status() (Status, error)
}

func NewAgent

func NewAgent(endpoint string) (Agent, error)

type Status

type Status struct {
	// State gives the human-readable status of an agent (e.g., "started" or "terminated")
	State string
}

Jump to

Keyboard shortcuts

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