Documentation
¶
Index ¶
- func IsErrorFinal(err error) bool
- func NewAutoscalingGroupNotHealthyError(desired int, actual int) error
- type Group
- type Instance
- type Logger
- type Manager
- func (m *Manager) GetAutoscalingGroupByID(id string) (*Group, error)
- func (m *Manager) GetAutoscalingGroupByStackName(stackName string) (*Group, error)
- func (m *Manager) GetAutoscalingGroups() ([]*Group, error)
- func (m *Manager) LastAutoscalingActivity(ctx context.Context, asgName *string) (*autoscaling.Activity, error)
- func (m *Manager) RegisterSpotFulfillmentDuration(instance *Instance, group *Group)
- func (m *Manager) StartMetricTimer(instance *Instance) *prometheus.Timer
- func (m *Manager) StopMetricTimer(instance *Instance) bool
- type MetricsEnabled
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorFinal ¶
IsErrorFinal checks whether the error is final
func NewAutoscalingGroupNotHealthyError ¶
NewAutoscalingGroupNotHealthyError creates a new errAutoscalingGroupNotHealthy
Types ¶
type Group ¶
type Group struct { *autoscaling.Group // contains filtered or unexported fields }
Group extends autoscaling.Group
type Instance ¶
type Instance struct { *autoscaling.Instance // contains filtered or unexported fields }
Instance extends autoscaling.Instance
func NewInstance ¶
func NewInstance(manager *Manager, instance *autoscaling.Instance) *Instance
NewInstance initialises and gives back a new Instance
func (*Instance) IsHealthyAndInService ¶
IsHealthyAndInService is true if the instance is healthy and in InService state
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is for quering auto scaling groups
func NewManager ¶
NewManager initialises and gives back a new Manager
func (*Manager) GetAutoscalingGroupByID ¶
GetAutoscalingGroupByID gets and auto scaling group by it's ID and gives back as an initialised Group
func (*Manager) GetAutoscalingGroupByStackName ¶
GetAutoscalingGroupByStackName gets and auto scaling group by the name of the stack which created it and gives back as an initialised Group
func (*Manager) GetAutoscalingGroups ¶
GetAutoscalingGroups gets auto scaling groups and gives back as initialised []Group
func (*Manager) LastAutoscalingActivity ¶
func (m *Manager) LastAutoscalingActivity(ctx context.Context, asgName *string) (*autoscaling.Activity, error)
GetLastAutoscalingActivity returns the last ASG activity recorded.
func (*Manager) RegisterSpotFulfillmentDuration ¶
RegisterSpotFulfillmentDuration checks whether a node instance has a fulfilled spot request related to it and sets the fulfillment duration into a Prometheus metric
func (*Manager) StartMetricTimer ¶
func (m *Manager) StartMetricTimer(instance *Instance) *prometheus.Timer
StartMetricTimer starts a prometheus metric timer for a node instance
func (*Manager) StopMetricTimer ¶
StopMetricTimer stops an existing timer of a node instance