Documentation ¶
Overview ¶
Package random provides the default non-deterministic policy
Index ¶
Constants ¶
const Name = "random"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Random ¶
type Random struct { // parameter "minInterval" MinInterval time.Duration // parameter "maxInterval" MaxInterval time.Duration // parameter "prioritizedEntities" PrioritizedEntities map[string]bool // parameter "shellActionInterval" ShellActionInterval time.Duration // parameter "shellActionCommand" ShellActionCommand string // parameter "faultActionProbability” FaultActionProbability float64 // parameter "procPolicy" ProcPolicy string // parameter "procPolicyParam" (for "mild" procPolicy) PPPMild pppMild // parameter "procPolicyParam" (for "extreme" procPolicy) PPPExtreme pppExtreme // parameter "procPolicyParam" (for "dirichlet" procPolicy) PPPDirichlet pppDirichlet // contains filtered or unexported fields }
func (*Random) ActionChan ¶
func (*Random) LoadConfig ¶
parameters:
minInterval(duration): min interval in millisecs (default: 0 msecs)
maxInterval(duration): max interval (default == minInterval)
prioritizedEntities([]string): prioritized entity string (default: empty)
shellActionInterval(duration): interval in millisecs for injecting ShellAction (default: 0) NOTE: this can be 0 only if shellFaultCommand=""(empty string))
shellActionCommand(string): command string for injecting ShellAction (default: empty string "") NOTE: the command execution blocks.
faultActionProbability(float64): probability (0.0-1.0) of PacketFaultAction/FilesystemFaultAction (default: 0.0)
procPolicy(string): "mild", "extreme", "dirichlet", ..
procPolicyParam(map[string]interface{}) for "mild": -- useBatch(bool): use SCHED_BATCH
procPolicyParam(map[string]interface{}) for "extreme": -- prioritized(int): prioritized processes count
procPolicyParam(map[string]interface{}) for "dirichlet": -- resetProbability(float64): probability (0.0-1.0) for resetting ProcSetSchedAction (default: 0.1)
should support dynamic reloading
func (*Random) QueueEvent ¶
func (*Random) SetHistoryStorage ¶
func (r *Random) SetHistoryStorage(storage historystorage.HistoryStorage) error