{"modulePath":"github.com/2lambda123/chaosmonkey","version":"v2.0.2+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package command\n\nPackage command contains functions that can be invoked via command-line e.g. \"chaosmonkey schedule\" invokes command.Schedule\n\n## Constants\n\n```go\nconst Version = \"2.0.2\"\n```\nVersion is the version number\n\n## Functions\n\n```go\nfunc DumpConfig(c chaosmonkey.AppConfigGetter, app string)\n```\nDumpConfig dumps the config for an app to stdout\n\n```go\nfunc DumpMonkeyConfig(cfg *config.Monkey)\n```\nDumpMonkeyConfig dumps the monkey-level config parameters to stdout\n\n```go\nfunc Eligible(g chaosmonkey.AppConfigGetter, d deploy.Deployment, app, account, region, stack, cluster string)\n```\nEligible prints out a list of instance ids eligible for termination It is intended only for testing\n\n```go\nfunc EnsureFileAbsent(path string) error\n```\nEnsureFileAbsent ensures that a file is absent, returning an error otherwise\n\n```go\nfunc Execute()\n```\nExecute is the main entry point for the chaosmonkey cli.\n\n```go\nfunc FetchSchedule(s schedstore.SchedStore, cfg *config.Monkey)\n```\nFetchSchedule executes the \"fetch-schedule\" command. This checks if there is an existing schedule for today that was previously registered in chaosmonkey-api. If so, it downloads the schedule from chaosmonkey-api and installs it locally.\n\n```go\nfunc Install(cfg *config.Monkey, exec CurrentExecutable, db mysql.MySQL)\n```\nInstall installs chaosmonkey and runs database migration\n\n```go\nfunc InstallCron(cfg *config.Monkey, exec CurrentExecutable)\n```\nInstallCron installs chaosmonkey schedule generation cron\n\n```go\nfunc Migrate(db mysql.MySQL)\n```\nMigrate executes database migration\n\n```go\nfunc Outage(ou chaosmonkey.Outage)\n```\nOutage prints out \"true\" if an ongoing outage, else \"false\"\n\n```go\nfunc Schedule(g chaosmonkey.AppConfigGetter, ss schedstore.SchedStore, cfg *config.Monkey, d deploy.Deployment, apps []string)\n```\nSchedule executes the \"schedule\" command. This defines the schedule of terminations for the day and records them as cron jobs\n\n```go\nfunc Terminate(d deps.Deps, app string, account string, region string, stack string, cluster string)\n```\nTerminate executes the \"terminate\" command. This selects an instance based on the app, account, region, stack, cluster passed\n\nregion, stack, and cluster may be blank\n\n```go\nfunc Usage()\n```\nUsage prints usage\n\n## Types\n\n```go\ntype ChaosmonkeyExecutable struct {\n}\n```\nChaosmonkeyExecutable is a representation of Chaosmonkey executable\n\n```go\nfunc (e ChaosmonkeyExecutable) ExecutablePath() (string, error)\n```\nExecutablePath implements command.CurrentExecutable.ExecutablePath\n\n```go\ntype CurrentExecutable interface {\n\t// ExecutablePath returns the path to current executable\n\tExecutablePath() (string, error)\n}\n```\nCurrentExecutable provides an interface to extract information about the current executable\n\n","path":"github.com/2lambda123/chaosmonkey/command","name":"command","synopsis":"Package command contains functions that can be invoked via command-line e.g.","isRedistributable":true}
