scaler

package
v0.4.2-alpha.0...-9a8b422 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2016 License: MIT Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposeCmdScaler

type ComposeCmdScaler struct {
	ServiceName       string `json:"service"`
	ConfigFile        string `json:"config"`
	ProjectName       string `json:"project"`
	RunningContainers uint64 `json:"running"`
	UpperCountLimit   uint64 `json:"upperCountLimit"`
	LowerCountLimit   uint64 `json:"lowerCountLimit"`
	// contains filtered or unexported fields
}

ComposeCmdScaler executer docker-compose CLI

func NewComposeCmdScaler

func NewComposeCmdScaler(name, project, configFilePath string) (*ComposeCmdScaler, error)

NewComposeCmdScaler build a scaler

func (*ComposeCmdScaler) Describe

func (s *ComposeCmdScaler) Describe() string

Describe scaler

func (*ComposeCmdScaler) Down

func (s *ComposeCmdScaler) Down() (err error)

Down using doker compose scale

func (*ComposeCmdScaler) JSON

func (s *ComposeCmdScaler) JSON() ([]byte, error)

JSON encoding

func (*ComposeCmdScaler) Up

func (s *ComposeCmdScaler) Up() error

Up using doker compose scale

type MockScaler

type MockScaler struct{}

MockScaler write "scale up" or "scale down" to stdout

func (*MockScaler) Describe

func (s *MockScaler) Describe() string

Describe scaler

func (*MockScaler) Down

func (s *MockScaler) Down() error

Down mock

func (*MockScaler) JSON

func (s *MockScaler) JSON() ([]byte, error)

JSON encode

func (*MockScaler) Up

func (s *MockScaler) Up() error

Up mock

type ServiceScaler

type ServiceScaler struct {
	ServiceID       string `json:"service"`
	EngineSocket    string `json:"socket"`
	UpperCountLimit uint64 `json:"upperCountLimit"`
	LowerCountLimit uint64 `json:"lowerCountLimit"`
	// contains filtered or unexported fields
}

ServiceScaler work with docker 1.12 swarm services (API 1.24)

func (*ServiceScaler) Describe

func (s *ServiceScaler) Describe() string

Describe scaler

func (*ServiceScaler) Down

func (s *ServiceScaler) Down() error

Down using API on swarm socket

func (*ServiceScaler) JSON

func (s *ServiceScaler) JSON() ([]byte, error)

JSON encode

func (*ServiceScaler) Up

func (s *ServiceScaler) Up() error

Up using API on swarm socket

Jump to

Keyboard shortcuts

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