Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLeaderIP ¶
func GetLeaderIP(machines []db.Machine, creds connection.Credentials) (string, error)
GetLeaderIP queries the given machines for the IP of the leader of cluster.
Types ¶
type Client ¶
type Client interface { // Close the grpc connection. Close() error // QueryMachines retrieves the machines tracked by the Kelda daemon. QueryMachines() ([]db.Machine, error) // QueryContainers retrieves the containers tracked by the Kelda daemon. QueryContainers() ([]db.Container, error) // QueryEtcd retrieves the etcd information tracked by the Kelda daemon. QueryEtcd() ([]db.Etcd, error) // QueryConnections retrieves the connection information tracked by the // Kelda daemon. QueryConnections() ([]db.Connection, error) // QueryLoadBalancers retrieves the load balancer information tracked by // the Kelda daemon. QueryLoadBalancers() ([]db.LoadBalancer, error) // QueryBlueprints retrieves blueprint information tracked by the Kelda daemon. QueryBlueprints() ([]db.Blueprint, error) // QueryCounters retrieves the debugging counters tracked with the Kelda daemon. QueryCounters() ([]pb.Counter, error) // QueryCounters retrieves the debugging counters tracked by a Kelda minion. // Only defined on the daemon. QueryMinionCounters(string) ([]pb.Counter, error) // QueryImages retrieves the image information tracked by the Kelda daemon. QueryImages() ([]db.Image, error) // SetSecret sets the value of a named secret in the cluster. The value is // encrypted and stored in Vault. SetSecret(name, value string) error // Deploy makes a request to the Kelda daemon to deploy the given deployment. // Only defined on the daemon. Deploy(deployment string) error // Version retrieves the Kelda version of the remote daemon. Version() (string, error) }
Client provides methods to interact with the Kelda daemon.
func Leader ¶
func Leader(machines []db.Machine, creds connection.Credentials) (Client, error)
Leader obtains a Client connected to the Leader of the cluster.
func New ¶
func New(lAddr string, creds connection.Credentials) (Client, error)
New creates a new Kelda client connected to `lAddr`.
type Getter ¶
type Getter func(string, connection.Credentials) (Client, error)
Getter obtains a client connected to the given address.
type NoLeaderError ¶
type NoLeaderError []string
NoLeaderError wraps the errors resulting from trying to find the leader of the cluster. It is exported so that callers can tell whether a call to `Leader` failed because it was unable to find the leader.
func (NoLeaderError) Error ¶
func (errorStrs NoLeaderError) Error() string
Click to show internal directories.
Click to hide internal directories.