Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector is a object that allows to interact with nomad worker
func New ¶ added in v0.0.10
New creates a new nomad connector The profile represents the name of the aws profile that shall be used to access the resources to scale the aws AutoScalingGroup. This parameter is optional. If the profile is NOT set the instance where sokar runs on has to have enough permissions to access the resources (ASG) for scaling (e.g. granted by a AWS Instance Profile). In this case the region parameter has to be specified instead (via WithAwsRegion()).
func (*Connector) AdjustScalingObjectCount ¶
func (c *Connector) AdjustScalingObjectCount(autoScalingGroup string, min uint, max uint, from uint, to uint) error
AdjustScalingObjectCount will scale the AutoScalingGroup to the desired count (amount of instances)
func (*Connector) GetScalingObjectCount ¶
GetScalingObjectCount will return the count of the nomad workers
func (*Connector) IsScalingObjectDead ¶
IsScalingObjectDead will return if the nomad workers of the actual data-center are still available.
type Option ¶ added in v0.0.10
type Option func(c *Connector)
Option represents an option for the awsEc2 Connector
func WithAwsRegion ¶ added in v0.0.10
WithAwsRegion sets the aws region in which the resource to be scaled can be found
func WithLogger ¶ added in v0.0.10
WithLogger adds a configured Logger to the awsEc2 Connector