Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StageToString ¶
StageToString convert a Stage struct to string for debugging
Types ¶
type Agent ¶
type Agent struct { Role string // role of node Address string // agent's IP Version string // agent's version for compatibility Selector map[string]string // selector for the agent }
Agent is a standalone controller at a node
type ControllerConfig ¶
type ControllerConfig struct { SystemTap *SystemTap `yaml:"systemtap"` // systemtap configuration ServiceMap map[string]*Service `yaml:"service"` // service configuration }
ControllerConfig is the base configuration of controller
func LoadControllerConfigFromFile ¶
func LoadControllerConfigFromFile(file string) (*ControllerConfig, error)
LoadControllerConfigFromFile create controller configuration from file
func (*ControllerConfig) String ¶
func (c *ControllerConfig) String() string
type Service ¶
type Service struct { Start string `yaml:"start"` // command to start the service Stop string `yaml:"stop"` // command to stop the service }
Service set the env of service
type Stage ¶
type Stage struct { Name string `yaml:"name"` Description string `yaml:"description"` TaskList []*Task `yaml:"tasks"` TaskDict map[string]*Task `yaml:"-"` TaskRequireDict map[string][]*Task `yaml:"-"` }
Stage is a group of tasks within a closure
func LoadStageFromDir ¶
LoadStageFromDir load all stage from data dir
func LoadStageFromFile ¶
LoadStageFromFile create a stage configuration from file
type Strategy ¶
type Strategy struct { Selector string `yaml:"selector"` // node selector, randomly select currently TickerCycle int `yaml:"ticker_cycle"` // ticker Cycle TickerLast int `yaml:"ticker_last"` // ticker duration Timeout int `yaml:"timeout"` // timeout configuration Limit int `yaml:"limit"` // limitation of nodes selected }
Strategy specifies how to run tasks
func (*Strategy) ToSelector ¶
ToSelector create a Selector form Strategy
type SystemTap ¶
type SystemTap struct { ScriptDir string `yaml:"script_dir"` // dir of the systemtap script IOProbeDir string `yaml:"probe_dir"` // dir to probe PidFile string `yaml:"pidfile"` // file to get pid }
SystemTap set the env for systemtap
type Task ¶
type Task struct { Type string `yaml:"type"` // type of task, eg. nemesis timer Name string `yaml:"name"` // unique name of the task Arguments map[string]string `yaml:"arguments"` // arguments to run the task Strategy Strategy `yaml:"strategy"` // rule to select node Requires []string `yaml:"requires"` // upstream of this task ID string `yaml:"-"` }
Task configuration
Click to show internal directories.
Click to hide internal directories.