Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewScalingProvider ¶
func NewScalingProvider(workerPool *structs.WorkerPool) (structs.ScalingProvider, error)
NewScalingProvider is a factory function that generates a new instance of the ScalingProvider.
Types ¶
type ScalingProvider ¶
type ScalingProvider struct {
AsgService *autoscaling.AutoScaling
}
ScalingProvider implements the ScalingProvider interface and provides a provider that is capable of performing scaling operations against Nomad worker pools running on AWS autoscaling groups.
The provider performs verification of each action it takes and provides automatic retry for scale-out operations that fail.
func (*ScalingProvider) Remove ¶
func (sp *ScalingProvider) Remove(workerPool *structs.WorkerPool, nodeAddr string) error
Remove pulls a node out of the worker ASG and terminates it
func (*ScalingProvider) SafetyCheck ¶
func (sp *ScalingProvider) SafetyCheck(workerPool *structs.WorkerPool) bool
SafetyCheck is an exported method that provides provider specific safety checks that will be used by core runner to determine if a scaling operation can be safely initiated.
func (*ScalingProvider) Scale ¶
func (sp *ScalingProvider) Scale(workerPool *structs.WorkerPool, config *structs.Config, nodeRegistry *structs.NodeRegistry) (err error)
Scale is the entry point method for performing scaling operations with the provider.