{"modulePath":"github.com/2lambda123/chaosmonkey","version":"v2.0.2+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package deploy\n\nPackage deploy contains information about all of the deployed instances, and how they are organized across accounts, apps, regions, clusters, and autoscaling groups.\n\n## Types\n\n```go\ntype ASG struct {\n\t// contains filtered or unexported fields\n}\n```\nASG identifies an autoscaling group in the deployment\n\n```go\nfunc NewASG(name, region string, instanceIDs []string, cluster *Cluster) *ASG\n```\nNewASG creates a new ASG\n\n```go\nfunc (a *ASG) AccountName() string\n```\nAccountName returns the name of the AWS account associated with the ASG\n\n```go\nfunc (a *ASG) AppName() string\n```\nAppName returns the name of the app associated with this ASG\n\n```go\nfunc (a *ASG) CloudProvider() string\n```\nCloudProvider returns the cloud provider (e.g., \"aws\")\n\n```go\nfunc (a *ASG) ClusterName() string\n```\nClusterName returns the name of the cluster associated with the ASG\n\n```go\nfunc (a *ASG) DetailName() string\n```\nDetailName returns the name of the detail field associated with the ASG\n\n```go\nfunc (a *ASG) Empty() bool\n```\nEmpty returns true if the ASG does not contain any instances\n\n```go\nfunc (a *ASG) Instances() []*Instance\n```\nInstances returns a slice of the instances associated with the ASG\n\n```go\nfunc (a *ASG) Name() string\n```\nName returns the name of the ASG\n\n```go\nfunc (a *ASG) RegionName() string\n```\nRegionName returns the name of the region associated with the ASG\n\n```go\nfunc (a *ASG) StackName() string\n```\nStackName returns the name of the stack\n\n```go\ntype ASGName string\n```\nASGName is the app-stack-detail-sequence name of an ASG\n\n```go\ntype Account struct {\n\t// contains filtered or unexported fields\n}\n```\nAccount represents the set of clusters associated with an App that reside in one AWS account (e.g., \"prod\", \"test\").\n\n```go\nfunc (a *Account) AppName() string\n```\nAppName returns the name of the app associated with this Account\n\n```go\nfunc (a *Account) CloudProvider() string\n```\nCloudProvider returns the cloud provider (e.g., \"aws\")\n\n```go\nfunc (a *Account) Clusters() []*Cluster\n```\nClusters returns a slice of clusters\n\n```go\nfunc (a *Account) Name() string\n```\nName returns the name of the account associated with this account\n\n```go\nfunc (a *Account) RegionNames() []string\n```\nRegionNames returns the name of the regions that clusters in this account are running in\n\n```go\nfunc (a *Account) StackNames() []string\n```\nStackNames returns the names of the stacks associated with this account\n\n```go\ntype AccountInfo struct {\n\tCloudProvider string\n\tClusters      ClusterMap\n}\n```\nAccountInfo tracks the provider and the clusters\n\n```go\ntype AccountName string\n```\nAccountName is the name of a cloud account\n\n```go\ntype App struct {\n\t// contains filtered or unexported fields\n}\n```\nApp represents an application\n\n```go\nfunc NewApp(name string, data AppMap) *App\n```\nNewApp constructs a new App\n\n```go\nfunc (a App) Accounts() []*Account\n```\nAccounts returns a slice of accounts\n\n```go\nfunc (app *App) EligibleInstanceGroups(cfg chaosmonkey.AppConfig) []grp.InstanceGroup\n```\nEligibleInstanceGroups returns a slice of InstanceGroups that represent groups of instances that are eligible for termination.\n\nNote that this code does not check for violations of mininum time between terminations. Chaos Monkey checks that precondition immediately before termination, not when considering groups of eligible instances.\n\nThe way instances are divided into group will depend on\n\n  - the grouping configuration for the app (cluster, stack, app)\n  - whether regions are independent\n\nThe returned InstanceGroups are guaranteed to contain at least one instance each\n\nPreconditions:\n\n  - app is enabled for Chaos Monkey\n\n```go\nfunc (a App) Name() string\n```\nName returns the name of an app\n\n```go\ntype AppMap map[AccountName]AccountInfo\n```\nAppMap is a map that tracks info about an app\n\n```go\ntype Cluster struct {\n\t// contains filtered or unexported fields\n}\n```\nCluster represents what Spinnaker refers to as a \"cluster\", which contains app-stack-detail. Every ASG is associated with exactly one cluster. Note that clusters can span regions\n\n```go\nfunc (c *Cluster) ASGs() []*ASG\n```\nASGs returns a slice of ASGs\n\n```go\nfunc (c *Cluster) AccountName() string\n```\nAccountName returns the name of the account associated with this cluster\n\n```go\nfunc (c *Cluster) AppName() string\n```\nAppName returns the name of the app associated with this cluster\n\n```go\nfunc (c *Cluster) CloudProvider() string\n```\nCloudProvider returns the cloud provider (e.g., \"aws\")\n\n```go\nfunc (c *Cluster) Name() string\n```\nName returns the name of the cluster, convention: app-stack-detail\n\n```go\nfunc (c *Cluster) RegionNames() []string\n```\nRegionNames returns the name of the region that this cluster runs in\n\n```go\nfunc (c *Cluster) StackName() string\n```\nStackName returns the name of the stack, following the app-stack-detail convention\n\n```go\ntype ClusterMap map[ClusterName]map[RegionName]map[ASGName][]InstanceID\n```\nClusterMap maps cluster name to information about instances by region and ASG\n\n```go\ntype ClusterName string\n```\nClusterName is the app-stack-detail name of a cluster\n\n```go\ntype Deployment interface {\n\t// Apps sends App objects over a channel\n\tApps(c chan\u003c- *App, appNames []string)\n\n\t// GetApp retrieves a single App\n\tGetApp(name string) (*App, error)\n\n\t// AppNames returns the names of all apps\n\tAppNames() ([]string, error)\n}\n```\nDeployment contains information about how apps are deployed\n\n```go\ntype Instance struct {\n\t// contains filtered or unexported fields\n}\n```\nInstance implements instance.Instance\n\n```go\nfunc (i *Instance) ASGName() string\n```\nASGName returns the name of the ASG associated with the instance\n\n```go\nfunc (i *Instance) AccountName() string\n```\nAccountName returns the name of the AWS account associated with the instance\n\n```go\nfunc (i *Instance) AppName() string\n```\nAppName returns the name of the app associated with this instance\n\n```go\nfunc (i *Instance) CloudProvider() string\n```\nCloudProvider returns the cloud provider (e.g., \"aws\")\n\n```go\nfunc (i *Instance) ClusterName() string\n```\nClusterName returns the name of the cluster associated with the instance\n\n```go\nfunc (i *Instance) ID() string\n```\nID returns the instance id\n\n```go\nfunc (i *Instance) RegionName() string\n```\nRegionName returns the name of the region associated with the instance\n\n```go\nfunc (i *Instance) StackName() string\n```\nStackName returns the name of the stack associated with the instance\n\n```go\nfunc (i *Instance) String() string\n```\n\n```go\ntype InstanceID string\n```\nInstanceID is the i-xxxxxx name of an AWS instance or uuid of a container\n\n```go\ntype RegionName string\n```\nRegionName is the name of an AWS region\n\n","path":"github.com/2lambda123/chaosmonkey/deploy","name":"deploy","synopsis":"Package deploy contains information about all of the deployed instances, and how they are organized across accounts, apps, regions, clusters, and autoscaling groups.","isRedistributable":true}
