wizard

package
v0.0.0-...-57b808a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(a *AutoScale) error

New creates a new auto scale based on AutoScale configuration

func Remove

func Remove(a *AutoScale) error

Remove removes an auto scale.

func Update

func Update(a *AutoScale) error

Update updates an auto scale

Types

type AutoScale

type AutoScale struct {
	Name      string      `json:"name"`
	ScaleUp   ScaleAction `json:"scaleUp"`
	ScaleDown ScaleAction `json:"scaleDown"`
	MinUnits  int         `json:"minUnits"`
	Process   string      `json:"process"`
}

AutoScale represents a auto scale configuration

func FindBy

func FindBy(q bson.M) ([]AutoScale, error)

FindByfinds auto scale by a query "q"

func FindByName

func FindByName(name string) (*AutoScale, error)

FindByName finds auto scale by name

func (*AutoScale) Disable

func (a *AutoScale) Disable() error

Disable disables the AutoScale alarms

func (*AutoScale) Enable

func (a *AutoScale) Enable() error

Enable enables the AutoScale alarms

func (*AutoScale) Enabled

func (a *AutoScale) Enabled() bool

Enabled returns true if the AutoScale alarms are enabled

func (*AutoScale) Events

func (a *AutoScale) Events() ([]alarm.Event, error)

Events return a list of AutoScale events

func (*AutoScale) MarshalJSON

func (a *AutoScale) MarshalJSON() ([]byte, error)

MarshalJSON marshals AutoScale in json format

type ScaleAction

type ScaleAction struct {
	Aggregator string        `json:"aggregator"`
	Metric     string        `json:"metric"`
	Operator   string        `json:"operator"`
	Value      string        `json:"value"`
	Step       string        `json:"step"`
	Wait       time.Duration `json:"wait"`
}

ScaleAction represents a auto scale action like scale up or scale down.

Jump to

Keyboard shortcuts

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