clients

package
v0.0.0-...-9575221 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Otter

type Otter struct {
	Hostname string
	// contains filtered or unexported fields
}

func NewOtterClient

func NewOtterClient(servers []string) (*Otter, error)

func (*Otter) CollectResults

func (otter *Otter) CollectResults(results chan *state.ResultMap, count int) *state.ResultMap

Collect results from a channel and append them to a ResultMap when they are received

func (*Otter) ListHosts

func (otter *Otter) ListHosts() ([]string, error)

List all registered remote hosts.

func (*Otter) RetrieveStateMap

func (otter *Otter) RetrieveStateMap() (*state.StateMap, error)

func (*Otter) SaveResultMap

func (otter *Otter) SaveResultMap(id string, resultMap *state.ResultMap) error

func (*Otter) SubmitCommand

func (otter *Otter) SubmitCommand(host, command string, resultChan chan *state.ResultMap)

Run a command against remote hosts

func (*Otter) SubmitCommands

func (otter *Otter) SubmitCommands(hostString, command string) (*state.ResultMap, error)

Submit a single command against all hosts who's name matches the given hostString.

func (*Otter) SubmitState

func (otter *Otter) SubmitState(state string) error

func (*Otter) UpdateHost

func (otter *Otter) UpdateHost(hostname, previous string) (string, error)

Update the list of remote hosts with the specified hostname.

func (*Otter) WaitForChange

func (otter *Otter) WaitForChange(key string, recurse bool, timeout time.Duration) (string, string, error)

Wait for a key to be added or modified in etcd

func (*Otter) WaitForCommand

func (otter *Otter) WaitForCommand(hostname string) (string, string, error)

Wait for a command and then return it.

func (*Otter) WaitForResults

func (otter *Otter) WaitForResults(id string) (*state.ResultMap, error)

Wait for a new ResultMap to be updated in the /result/<id> keyspace.

Jump to

Keyboard shortcuts

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