Documentation ¶
Overview ¶
Package orchestration implements deployment and orchestration of hotstuff replicas and clients on remote hosts. A "controller" uses the iago framework to connect to hosts via ssh and deploy hotstuff. This is implemented by the Deploy() function. The deploy function also starts a "worker" on each connected host. The controller communicates via workers through the worker's stdin and stdout streams. The worker's stderr stream is forwarded to the stderr stream of the controller.
Index ¶
- func Deploy(g iago.Group, cfg DeployConfig) (workers map[string]WorkerSession, err error)
- func FetchData(g iago.Group, dest string) (err error)
- type DeployConfig
- type Experiment
- type HostConfig
- type RemoteWorker
- func (w RemoteWorker) CreateReplica(req *orchestrationpb.CreateReplicaRequest) (res *orchestrationpb.CreateReplicaResponse, err error)
- func (w RemoteWorker) Quit() (err error)
- func (w RemoteWorker) StartClient(req *orchestrationpb.StartClientRequest) (res *orchestrationpb.StartClientResponse, err error)
- func (w RemoteWorker) StartReplica(req *orchestrationpb.StartReplicaRequest) (res *orchestrationpb.StartReplicaResponse, err error)
- func (w RemoteWorker) StopClient(req *orchestrationpb.StopClientRequest) (res *orchestrationpb.StopClientResponse, err error)
- func (w RemoteWorker) StopReplica(req *orchestrationpb.StopReplicaRequest) (res *orchestrationpb.StopReplicaResponse, err error)
- type Worker
- type WorkerSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(g iago.Group, cfg DeployConfig) (workers map[string]WorkerSession, err error)
Deploy deploys the hotstuff binary to a group of servers and starts a worker on the given port.
Types ¶
type DeployConfig ¶
type DeployConfig struct { ExePath string LogLevel string CPUProfiling bool MemProfiling bool Tracing bool Fgprof bool Metrics []string MeasurementInterval time.Duration }
DeployConfig contains configuration options for deployment.
type Experiment ¶
type Experiment struct { *orchestrationpb.ReplicaOpts *orchestrationpb.ClientOpts NumReplicas int NumClients int Duration time.Duration Hosts map[string]RemoteWorker HostConfigs map[string]HostConfig Byzantine map[string]int // number of replicas to assign to each byzantine strategy // contains filtered or unexported fields }
Experiment holds variables for an experiment.
type HostConfig ¶
HostConfig specifies the number of replicas and clients that should be started on a specific host.
type RemoteWorker ¶
type RemoteWorker struct {
// contains filtered or unexported fields
}
RemoteWorker is a proxy for a remote worker.
func NewRemoteWorker ¶
func NewRemoteWorker(send *protostream.Writer, recv *protostream.Reader) RemoteWorker
NewRemoteWorker returns a new remote worker proxy.
func (RemoteWorker) CreateReplica ¶
func (w RemoteWorker) CreateReplica(req *orchestrationpb.CreateReplicaRequest) (res *orchestrationpb.CreateReplicaResponse, err error)
CreateReplica requests that the remote worker creates the specified replicas, returning details about the created replicas.
func (RemoteWorker) Quit ¶
func (w RemoteWorker) Quit() (err error)
Quit requests that the remote worker exits.
func (RemoteWorker) StartClient ¶
func (w RemoteWorker) StartClient(req *orchestrationpb.StartClientRequest) (res *orchestrationpb.StartClientResponse, err error)
StartClient requests that the remote worker starts the specified clients.
func (RemoteWorker) StartReplica ¶
func (w RemoteWorker) StartReplica(req *orchestrationpb.StartReplicaRequest) (res *orchestrationpb.StartReplicaResponse, err error)
StartReplica requests that the remote worker starts the specified replicas.
func (RemoteWorker) StopClient ¶
func (w RemoteWorker) StopClient(req *orchestrationpb.StopClientRequest) (res *orchestrationpb.StopClientResponse, err error)
StopClient requests that the remote worker stops the specified clients.
func (RemoteWorker) StopReplica ¶
func (w RemoteWorker) StopReplica(req *orchestrationpb.StopReplicaRequest) (res *orchestrationpb.StopReplicaResponse, err error)
StopReplica requests that the remote worker stops the specified replica.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker starts and runs clients and replicas based on commands from the controller.
func NewWorker ¶
func NewWorker(send *protostream.Writer, recv *protostream.Reader, dl modules.MetricsLogger, metrics []string, measurementInterval time.Duration) Worker
NewWorker returns a new worker.
type WorkerSession ¶
type WorkerSession struct {
// contains filtered or unexported fields
}
WorkerSession contains the state of a connected worker.
func (WorkerSession) Close ¶
func (ws WorkerSession) Close() (err error)
Close closes the session and all of its streams.
func (WorkerSession) Stderr ¶
func (ws WorkerSession) Stderr() io.Reader
Stderr returns a reader of the worker's stderr stream.
func (WorkerSession) Stdin ¶
func (ws WorkerSession) Stdin() io.Writer
Stdin returns a writer to the the worker's stdin stream.
func (WorkerSession) Stdout ¶
func (ws WorkerSession) Stdout() io.Reader
Stdout returns a reader of the worker's stdout stream.