chaosmonkey package - github.com/Netflix/chaosmonkey - Go Packages
Package chaosmonkey contains our domain models
This section is empty.
This section is empty.
This section is empty.
type AppConfig struct {
Enabled bool
RegionsAreIndependent bool
MeanTimeBetweenKillsInWorkDays int
MinTimeBetweenKillsInWorkDays int
Grouping Group
Exceptions []Exception
Whitelist *[]Exception
}
AppConfig contains app-specific configuration parameters for Chaos Monkey
AppConfigGetter retrieves App configuration info
Checker checks to see if a termination is permitted given min time between terminations
if the termination is permitted, returns (true, nil) otherwise, returns false with an error
Returns ErrViolatesMinTime if violates min time between terminations ΒΆ
Note that this call may change the state of the server: if the checker returns true, the termination will be recorded.
Decryptor decrypts encrypted text. It is used for decrypting sensitive credentials that are stored encrypted
type Env interface {
InTest() bool
}
Env provides information about the environment that Chaos Monkey has been deployed to.
ErrViolatesMinTime represents an error when trying to record a termination that violates the min time between terminations for that particular app
type ErrorCounter interface {
Increment() error
}
ErrorCounter counts when errors occur.
Exception describes clusters that have been opted out of chaos monkey If one of the members is a "*", it matches everything. That is the only wildcard value For example, this will opt-out all of the cluters in the test account: Exception{ Account:"test", Stack:"*", Cluster:"*", Region: "*"}
Group describes what Chaos Monkey considers a group of instances Chaos Monkey will randomly kill an instance from each group. The group generally maps onto what the service owner considers a "cluster", which is different from Spinnaker's notion of a cluster.
String returns a string representation for a Group
Instance contains naming info about an instance
Outage provides an interface for checking if there is currently an outage This provides a mechanism to check if there's an ongoing outage, since Chaos Monkey doesn't run during outages
Termination contains information about an instance termination.
type Terminator interface {
Execute(trm Termination) error
}
Terminator provides an interface for killing instances
type Tracker interface {
Track(t Termination) error
}
Tracker records termination events an a tracking system such as Chronos