orchestration

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 55 Imported by: 0

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

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.

func FetchData

func FetchData(g iago.Group, dest string) (err error)

FetchData downloads the data from the workers.

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 {
	// contains filtered or unexported fields
}

Experiment coordinates replicas and clients, controls experiment flow and handles measurement output.

func NewExperiment added in v0.5.0

func NewExperiment(
	cfg *config.ExperimentConfig,
	workers map[string]RemoteWorker,
	logger logging.Logger,
) (*Experiment, error)

NewExperiment returns a struct containing the general experiment configuration.

func (*Experiment) Run

func (e *Experiment) Run() (err error)

Run runs the experiment.

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

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

StartClient requests that the remote worker starts the specified clients.

func (RemoteWorker) StartReplica

StartReplica requests that the remote worker starts the specified replicas.

func (RemoteWorker) StopClient

StopClient requests that the remote worker stops the specified clients.

func (RemoteWorker) StopReplica

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 metrics.Logger, metrics []string, measurementInterval time.Duration) Worker

NewWorker returns a new worker.

func (*Worker) Run

func (w *Worker) Run() error

Run runs the worker until it receives a command to quit.

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.

Jump to

Keyboard shortcuts

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