api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Enabled              bool
	Resource             string
	ComparisonOperator   string
	ComparisonPercentage float64
	Action               string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) Policy

func (c *Client) Policy() *Policy

func (*Client) Scale

func (c *Client) Scale() *Scale

func (*Client) System

func (c *Client) System() *System

type Config

type Config struct {
	Address   string
	TLSConfig *TLSConfig
	// contains filtered or unexported fields
}

func DefaultConfig

func DefaultConfig(cfg *clientCfg.Config) *Config

func (*Config) ConfigureTLS

func (c *Config) ConfigureTLS() error

type HealthResp

type HealthResp struct {
	Status string
}

type Policy

type Policy struct {
	// contains filtered or unexported fields
}

func (*Policy) Delete

func (p *Policy) Delete(class string) error

func (*Policy) Info

func (p *Policy) Info(class string) (*ScalingPolicy, error)

func (*Policy) List

func (p *Policy) List() (*map[string]ScalingPolicy, error)

func (*Policy) Write

func (p *Policy) Write(class string, policy *ScalingPolicy) error

type QueryOptions

type QueryOptions struct {

	// Params are HTTP parameters on the query URL.
	Params map[string]string
}

QueryOptions are used to create a query which includes query params. This is used for GET, POST and PUT calls.

type Scale

type Scale struct {
	// contains filtered or unexported fields
}

func (*Scale) In

func (s *Scale) In(class string) (*ScaleResp, error)

func (*Scale) Out

func (s *Scale) Out(class string) (*ScaleResp, error)

func (*Scale) StatusInfo

func (s *Scale) StatusInfo(id string) (*state.ScalingActivity, error)

func (*Scale) StatusList

func (s *Scale) StatusList() (*map[uuid.UUID]state.ScalingActivity, error)

type ScaleResp

type ScaleResp struct {
	ID string
}

type ScalingPolicy

type ScalingPolicy struct {
	Enabled        bool
	Class          string
	MinCount       int
	MaxCount       int
	ScaleOutCount  int
	ScaleInCount   int
	Provider       string
	ProviderConfig map[string]string
	Checks         map[string]Check
}

type System

type System struct {
	// contains filtered or unexported fields
}

func (*System) Health

func (s *System) Health() (*HealthResp, error)

type TLSConfig

type TLSConfig struct {
	CACert        string
	ClientCert    string
	ClientCertKey string
}

Jump to

Keyboard shortcuts

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