Documentation ¶
Overview ¶
Package grp holds the InstanceGroup interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyCluster ¶
func AnyCluster(g InstanceGroup) bool
AnyCluster is true if the group matches any region
func AnyRegion ¶
func AnyRegion(g InstanceGroup) bool
AnyRegion is true if the group matches any region
func AnyStack ¶
func AnyStack(g InstanceGroup) bool
AnyStack is true if the group matches any region
func Contains ¶
func Contains(g InstanceGroup, app, account, region, stack, cluster string) bool
Contains returns true if the asg/instance with matching app, account, region, stack and cluster are elements of this instance group
func Equal ¶
func Equal(g1, g2 InstanceGroup) bool
Equal returns true if g1 and g2 represent the same group of instances
func String ¶
func String(group InstanceGroup) string
String outputs a string representation of InstanceGroup suitable for logging
Types ¶
type InstanceGroup ¶
type InstanceGroup interface { // App returns the name of the app App() string // Account returns the name of the app Account() string // Region returns (region name, region present) // If the group is cross-region, the boolean will be false Region() (name string, ok bool) // Stack returns (region name, region present) // If the group is cross-stack, the boolean will be false Stack() (name string, ok bool) // Cluster returns (cluster name, cluster present) // If the group is cross-cluster, the boolean will be false Cluster() (name string, ok bool) }
InstanceGroup represents a group of instances
func New ¶
func New(app, account, region, stack, cluster string) InstanceGroup
New generates an InstanceGroup. region, stack, and cluster may be empty strings, in which case the group is cross-region, cross-stack, or cross-cluster Note that stack and cluster are mutually exclusive, can specify one but not both