group

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LockedProcedure

func LockedProcedure(group *Group, api core.Client, process locked) error

func Scale

func Scale(group *Group, api core.Client, direction string) error

func ScalingScriptResult

func ScalingScriptResult(group *Group) string

func Validate

func Validate(group *Group) error

Types

type Group

type Group struct {
	Name             string    `yaml:"name"`
	PermanentServers []*Server `yaml:"permanent_servers"`
	ScalingServers   []*Server `yaml:"scaling_servers"`
	ScalingScript    string    `yaml:"scaling_script"`
	StopScript       string    `yaml:"stop_script"`
	Strategy         string    `yaml:"strategy"`
	Environment      *environments.Model
}

func ByName

func ByName(api core.Client, name string) (*Group, error)

func (*Group) CanScale

func (group *Group) CanScale(direction string) bool

func (*Group) Candidates

func (g *Group) Candidates(direction string) []scaler.Server

func (*Group) PreStop

func (g *Group) PreStop() string

func (*Group) ScalingStrategy

func (g *Group) ScalingStrategy() string

type Server

type Server struct {
	ID       string `yaml:"id"`
	Instance *servers.Model
}

func (*Server) AmazonID

func (s *Server) AmazonID() string

func (*Server) EngineYardID

func (s *Server) EngineYardID() int

func (*Server) Hostname

func (s *Server) Hostname() string

Jump to

Keyboard shortcuts

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