Documentation
¶
Index ¶
- type Controller
- func (c *Controller) OnDataUsage(dloadKiB, uploadKiB float64)
- func (c *Controller) OnProgress(perc float64, msg string)
- func (c *Controller) Run(builder *engine.ExperimentBuilder, inputs []string) error
- func (c *Controller) SetInputIdxMap(inputIdxMap map[int64]int64) error
- func (c *Controller) SetNettestIndex(i, n int)
- type Nettest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller is passed to the run method of every Nettest each nettest instance has one controller
func NewController ¶
NewController creates a nettest controller
func (*Controller) OnDataUsage ¶
func (c *Controller) OnDataUsage(dloadKiB, uploadKiB float64)
OnDataUsage should be called when we have a data usage update.
func (*Controller) OnProgress ¶
func (c *Controller) OnProgress(perc float64, msg string)
OnProgress should be called when a new progress event is available.
func (*Controller) Run ¶
func (c *Controller) Run(builder *engine.ExperimentBuilder, inputs []string) error
Run runs the selected nettest using the related experiment with the specified inputs.
This function will continue to run in most cases but will immediately halt if something's wrong with the file system.
func (*Controller) SetInputIdxMap ¶
func (c *Controller) SetInputIdxMap(inputIdxMap map[int64]int64) error
SetInputIdxMap is used to set the mapping of index into input. This mapping is used to reference, for example, a particular URL based on the index inside of the input list and the index of it in the database.
func (*Controller) SetNettestIndex ¶
func (c *Controller) SetNettestIndex(i, n int)
SetNettestIndex is used to set the current nettest index and total nettest count to compute a different progress percentage.