scaler

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContainerByName

func GetContainerByName(client *client.Client, name string, ctx context.Context) (*types.Container, error)

func GetServiceByName

func GetServiceByName(client *client.Client, name string, ctx context.Context) (*swarm.Service, error)

Types

type DockerClassicScaler

type DockerClassicScaler struct{}

func (DockerClassicScaler) IsUp

func (DockerClassicScaler) IsUp(client *client.Client, name string) bool

func (DockerClassicScaler) ScaleDown

func (DockerClassicScaler) ScaleDown(client *client.Client, name string)

func (DockerClassicScaler) ScaleUp

func (DockerClassicScaler) ScaleUp(client *client.Client, name string, replicas *uint64)

type DockerSwarmScaler

type DockerSwarmScaler struct{}

func (DockerSwarmScaler) IsUp

func (DockerSwarmScaler) IsUp(client *client.Client, name string) bool

func (DockerSwarmScaler) ScaleDown

func (DockerSwarmScaler) ScaleDown(client *client.Client, name string)

func (DockerSwarmScaler) ScaleUp

func (DockerSwarmScaler) ScaleUp(client *client.Client, name string, replicas *uint64)

type Scaler

type Scaler interface {
	ScaleUp(client *client.Client, name string, replicas *uint64)
	ScaleDown(client *client.Client, name string)
	IsUp(client *client.Client, name string) bool
}

Jump to

Keyboard shortcuts

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