client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Close the grpc connection.
	Close() error

	// QueryMachines retrieves the machines tracked by the Quilt daemon.
	QueryMachines() ([]db.Machine, error)

	// QueryContainers retrieves the containers tracked by the Quilt daemon.
	QueryContainers() ([]db.Container, error)

	// QueryEtcd retrieves the etcd information tracked by the Quilt daemon.
	QueryEtcd() ([]db.Etcd, error)

	// QueryConnections retrieves the connection information tracked by the
	// Quilt daemon.
	QueryConnections() ([]db.Connection, error)

	// QueryLabels retrieves the label information tracked by the Quilt daemon.
	QueryLabels() ([]db.Label, error)

	// QueryClusters retrieves cluster information tracked by the Quilt daemon.
	QueryClusters() ([]db.Cluster, error)

	// Deploy makes a request to the Quilt daemon to deploy the given deployment.
	Deploy(deployment string) error

	// Host returns the server address the Client is connected to.
	Host() string
}

Client provides methods to interact with the Quilt daemon.

func New

func New(lAddr string) (Client, error)

New creates a new Quilt client connected to `lAddr`.

type Getter

type Getter interface {
	// Client obtains a client connected to the given address.
	Client(string) (Client, error)

	// ContainerClient obtains a client connected to the host running the given
	// container.
	ContainerClient(Client, string) (Client, error)

	// LeaderClient obtains a client connected to cluster leader.
	LeaderClient(Client) (Client, error)
}

Getter provides methods for obtaining Quilt clients connected to various servers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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