random

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package random provides the default non-deterministic policy

Index

Constants

View Source
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 New

func New() *Random

func (*Random) ActionChan

func (r *Random) ActionChan() chan signal.Action

func (*Random) LoadConfig

func (r *Random) LoadConfig(cfg config.Config) error

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) Name

func (this *Random) Name() string

returns "random"

func (*Random) QueueEvent

func (r *Random) QueueEvent(event signal.Event)

func (*Random) SetHistoryStorage

func (r *Random) SetHistoryStorage(storage historystorage.HistoryStorage) error

Jump to

Keyboard shortcuts

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