ess

package
v0.0.0-...-4fa2da9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*ess.Client
}

Client struct

func New

func New() *Client

New creates a new ESS client

func (*Client) ChangeAllMaxSize

func (c *Client) ChangeAllMaxSize(newMaxSize int)

ChangeAllMaxSize will change the max size of all scaling groups

func (*Client) ChangeAllMinSize

func (c *Client) ChangeAllMinSize(newMinSize int)

ChangeAllMinSize will change the min size of all scaling groups

func (*Client) ChangeMaxSize

func (c *Client) ChangeMaxSize(scalingGroupID string, newMaxSize int) error

ChangeMaxSize will change the max size of the specified scaling group

func (*Client) ChangeMinSize

func (c *Client) ChangeMinSize(scalingGroupID string, newMinSize int) error

ChangeMinSize will change the min size of the specified scaling group

func (*Client) DisableEventTriggerTask

func (c *Client) DisableEventTriggerTask(alarmTaskID string) error

DisableEventTriggerTask will disable the event trigger task

func (*Client) EnableEventTriggerTask

func (c *Client) EnableEventTriggerTask(alarmTaskID string) error

EnableEventTriggerTask will enable the event trigger task

func (*Client) ModifyDownScalingRule

func (c *Client) ModifyDownScalingRule(scalingGroupName string, adjValue int) error

ModifyDownScalingRule will modify downscale scaling rule (scaling rule with "-downscale" suffix)

func (*Client) ModifyUpScalingRule

func (c *Client) ModifyUpScalingRule(scalingGroupName string, adjValue int) error

ModifyUpScalingRule will modify upscale scaling rule (scaling rule with "-upscale" suffix)

func (*Client) QueryETInfo

func (c *Client) QueryETInfo(scalingGroupID string) ([]ETInfo, error)

QueryETInfo queries useful info about an event-trigger task

func (*Client) QuerySCInfo

func (c *Client) QuerySCInfo(id string) ([]SCInfo, error)

QuerySCInfo query relatively useful info about a scaling configuration

func (*Client) QuerySGInfo

func (c *Client) QuerySGInfo(name string) ([]SGInfo, error)

QuerySGInfo will query relatively useful info about a scaling group

func (*Client) RemoveUpscaledInstances

func (c *Client) RemoveUpscaledInstances(scalingGroupName string, retryCount int, retryInterval int) (bool, error)

RemoveUpscaledInstances will remove currently upscaled instances down to minimum instances number. Removal will happen by executing downscale rule, so instances number will not go below minimum instances number. But we'll remove 80% instead of 100% of total capacity, in case the minimum instance is zero

func (*Client) UpscaleInstances

func (c *Client) UpscaleInstances(scalingGroupName string, numToAdd int) (bool, error)

UpscaleInstances will add numToAdd instances by triggering the upscale scaling rule

type ETInfo

type ETInfo struct {
	AlarmTaskID        string
	Name               string
	MetricName         string
	EvaluationCount    int
	Threshold          float64
	ComparisonOperator string
	Enable             bool
}

ETInfo contains relevant info about an Event-Trigger Task

func (*ETInfo) String

func (e *ETInfo) String() string

String pretty prints the struct ETInfo

type SCInfo

type SCInfo struct {
	UserData                 string
	ScalingConfigurationName string
}

SCInfo contains useful info about a scaling configuration

type SGInfo

type SGInfo struct {
	ScalingGroupName         string
	ScalingGroupID           string
	TotalCapacity            int
	MinSize                  int
	MaxSize                  int
	ProtectedCapacity        int
	ScalingConfigurationName string
	UserData                 string
}

SGInfo contains useful info about a scaling group

func (*SGInfo) String

func (s *SGInfo) String() string

String pretty prints the struct SGInfo

type SRInfo

type SRInfo struct {
	ScalingRuleID   string
	ScalingRuleAri  string
	ScalingRuleName string
	AdjustmentValue int
	AdjustmentType  string
}

SRInfo contains scaling rule info

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL