Documentation
¶
Index ¶
- Constants
- func ApplyDiskAttack(options core.AttackConfig, env Environment) error
- func ApplyDiskServerAttack(options core.AttackConfig, env Environment) error
- func ExpireFunc(cli *redis.Client, key string, expiration time.Duration, option string) *redis.BoolCmd
- func FindSymbolInEntry(p ptrace.TracedProgram, symbolName string, entry *mapreader.Entry) (addr uint64, size uint64, err error)
- type AttackType
- type Environment
- type HostManager
- type OutputHandler
- type Server
- type UnixHost
Constants ¶
View Source
const ( STATUSOK = "OK" OPTIONNX = "NX" OPTIONXX = "XX" OPTIONGT = "GT" OPTIONLT = "LT" )
View Source
const ( CPUSTRESSORTOOL = "stress-ng" MEMORYSTRESSORTOOL = "memStress" )
View Source
const CmdReboot = "reboot"
View Source
const CmdShutdown = "shutdown"
Variables ¶
This section is empty.
Functions ¶
func ApplyDiskAttack ¶ added in v1.4.0
func ApplyDiskAttack(options core.AttackConfig, env Environment) error
func ApplyDiskServerAttack ¶ added in v1.4.0
func ApplyDiskServerAttack(options core.AttackConfig, env Environment) error
func ExpireFunc ¶ added in v1.2.1
func FindSymbolInEntry ¶ added in v1.1.0
func FindSymbolInEntry(p ptrace.TracedProgram, symbolName string, entry *mapreader.Entry) (addr uint64, size uint64, err error)
FindSymbolInEntry finds symbol in entry through parsing elf
Types ¶
type AttackType ¶ added in v1.0.0
type AttackType interface { // Attack execute attack with options and env. // ExecuteAttack will store the options ahead of Attack be executed // and will store options again after Attack be executed. // We can also use env.Chaos.expStore to touch the storage of chaosd. // But do not update it with your own uid , // because it will be covered after Attack executed with options. Attack(options core.AttackConfig, env Environment) error // Recover can get marshaled options data from experiment and recover it. Recover(experiment core.Experiment, env Environment) error }
var ClockAttack AttackType = clockAttack{}
var DiskAttack AttackType = diskAttack{}
var DiskServerAttack AttackType = diskServerAttack{}
var FileAttack AttackType = fileAttack{}
var HTTPAttack AttackType = attackHTTP{}
var HostAttack AttackType = hostAttack{}
var JVMAttack AttackType = jvmAttack{}
var KafkaAttack AttackType = kafkaAttack{}
var NetworkAttack AttackType = networkAttack{}
var ProcessAttack AttackType = processAttack{}
var RedisAttack AttackType = redisAttack{}
var StressAttack AttackType = stressAttack{}
var UserDefinedAttack AttackType = userDefinedAttack{}
var VMAttack AttackType = vmAttack{}
type Environment ¶ added in v1.0.0
type HostManager ¶
var Host HostManager = UnixHost{}
type OutputHandler ¶ added in v1.4.0
type OutputHandler struct { StdoutHandler func([]byte, error, chan interface{}) OutputChan chan interface{} }
func NewOutputHandler ¶ added in v1.4.0
func NewOutputHandler( handler func([]byte, error, chan interface{}), outputChan chan interface{}) *OutputHandler
type Server ¶
type Server struct { ExpRun core.ExperimentRunStore Cron scheduler.Scheduler CmdPools map[string]*utils.CommandPools // contains filtered or unexported fields }
func NewServer ¶
func NewServer( conf *config.Config, exp core.ExperimentStore, expRun core.ExperimentRunStore, ipset core.IPSetRuleStore, iptables core.IptablesRuleStore, tc core.TCRuleStore, svr *chaosdaemon.DaemonServer, cron scheduler.Scheduler, ) *Server
func (*Server) ExecuteAttack ¶ added in v1.0.0
func (s *Server) ExecuteAttack(attackType AttackType, options core.AttackConfig, launchMode string) (uid string, err error)
ExecuteAttack creates a new Experiment record and may schedule/execute an attack for the given attackType. If options.Schedule isn't provided, then the attack is executed immediately. Otherwise the attack is scheduled based on the provided schedule spec and duration.
func (*Server) RecoverAttack ¶ added in v1.0.0
func (*Server) Search ¶
func (s *Server) Search(conds *core.SearchCommand) ([]*core.Experiment, error)
Click to show internal directories.
Click to hide internal directories.