dash

package
v0.0.0-...-1dd1f65 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package dash contains the c4t console dashboard.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchInstance = errors.New("received message for instance that doesn't exist")

ErrNoSuchInstance occurs when a message arrives from an instance that the dashboard hasn't allocated room for.

Functions

func NewCorpusObserver

func NewCorpusObserver() (*actionObserver, error)

Types

type Dash

type Dash struct {
	// contains filtered or unexported fields
}

Dash is a director observer that displays all of the current director machines in a terminal dashboard.

func New

func New() (*Dash, error)

New constructs a dashboard for the given machine IDs.

func (*Dash) Close

func (d *Dash) Close() error

Close closes the dashboard's terminal.

func (*Dash) OnBuild

func (d *Dash) OnBuild(builder.Message)

OnBuild (currently) does nothing.

func (*Dash) OnCompilerConfig

func (d *Dash) OnCompilerConfig(compiler.Message)

OnCompilerConfig (currently) does nothing.

func (*Dash) OnCycle

func (d *Dash) OnCycle(m director.CycleMessage)

OnCycle forwards the cycle message m to the relevant instance.

func (*Dash) OnCycleAnalysis

func (d *Dash) OnCycleAnalysis(m director.CycleAnalysis)

OnCycleAnalysis forwards the analysis m to the relevant instance.

func (*Dash) OnCycleBuild

func (d *Dash) OnCycleBuild(c director.Cycle, m builder.Message)

OnCycleBuild forwards the cycle corpus build information m to the instance mentioned in c.

func (*Dash) OnCycleCompiler

func (d *Dash) OnCycleCompiler(c director.Cycle, m compiler.Message)

OnCycleCompiler forwards the compiler message m to the instance mentioned in c.

func (*Dash) OnCycleCopy

func (d *Dash) OnCycleCopy(c director.Cycle, m copier.Message)

OnCycleCopy forwards the copier message m to the instance mentioned in c.

func (*Dash) OnCycleInstance

func (d *Dash) OnCycleInstance(c director.Cycle, m director.InstanceMessage)

OnCycleInstance forwards the instance message m to the instance mentioned in c.

func (*Dash) OnCycleSave

func (d *Dash) OnCycleSave(c director.Cycle, m saver.ArchiveMessage)

OnCycleSave forwards the archive message m to the instance mentioned in c.

func (*Dash) OnMachines

func (d *Dash) OnMachines(machine.Message)

func (*Dash) OnPlan

func (d *Dash) OnPlan(planner.Message)

OnPlan (currently) does nothing.

func (*Dash) OnPrepare

func (d *Dash) OnPrepare(m director.PrepareMessage)

OnPrepare uses the instance calculation to prepare a machine grid.

func (*Dash) Run

func (d *Dash) Run(ctx context.Context, cancel func()) error

Run runs a dashboard in a blocking manner.

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

Instance represents a single machine instance inside a dash.

func NewInstance

func NewInstance(id string, d *Dash) (*Instance, error)

NewInstance constructs an Instance, initialising its various widgets. It accepts the id of the parent container (from which the IDs of various sub-containers can be derived), as well as the parent dash d (used to access the results log and parent container).

func (*Instance) AddToGrid

func (o *Instance) AddToGrid(gb *grid.Builder, pc int)

AddToGrid adds this observer to a grid builder gb with the container ID id..

func (*Instance) OnAnalysis

func (o *Instance) OnAnalysis(a analysis.Analysis)

OnAnalysis observes an analysis by adding failure/timeout/flag rates to the sparklines.

func (*Instance) OnArchive

func (o *Instance) OnArchive(saver.ArchiveMessage)

OnArchive currently ignores a save observation.

func (*Instance) OnBuild

func (o *Instance) OnBuild(m builder.Message)

OnBuild forwards a build observation.

func (*Instance) OnCompilerConfig

func (o *Instance) OnCompilerConfig(m compiler.Message)

OnCompilerConfig forwards a build observation.

func (*Instance) OnCopy

func (o *Instance) OnCopy(m copy2.Message)

OnCopy forwards a copy observation.

func (*Instance) OnCycle

func (o *Instance) OnCycle(r director.CycleMessage)

OnCycle logs that a new iteration has begun.

func (*Instance) OnInstance

func (o *Instance) OnInstance(m director.InstanceMessage)

OnInstance forwards the instance message to relevant bits of the dash.

func (*Instance) OnMachineNodeAction

func (o *Instance) OnMachineNodeAction(observer.Message)

OnMachineNodeAction does nothing, at the moment.

func (*Instance) OnPerturb

func (o *Instance) OnPerturb(perturber.Message)

OnPerturb does nothing, at the moment.

type ResultLog

type ResultLog struct {
	// contains filtered or unexported fields
}

ResultLog provides a logging mechanism for collated subjects.

func NewResultLog

func NewResultLog() (*ResultLog, error)

NewResultLog creates a new ResultLog.

func (*ResultLog) Log

Log logs a sourced collation sc.

func (*ResultLog) LogBucketEntry

func (r *ResultLog) LogBucketEntry(sname string) error

LogBucketEntry logs an entry for a subject with name sname.

func (*ResultLog) LogBucketHeader

func (r *ResultLog) LogBucketHeader(st status.Status) error

LogBucketHeader logs the header of a collation bucket with status st.

func (*ResultLog) LogHeader

func (r *ResultLog) LogHeader(sc director.CycleAnalysis) error

LogHeader logs the header of a sourced collation sc.

Jump to

Keyboard shortcuts

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