api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: MPL-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

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

func (*Client) Policies

func (c *Client) Policies() *Policies

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 InfoResp

type InfoResp struct {
	NomadAddress              string
	PolicyEngine              string
	PolicyStorageBackend      string
	InternalAutoScalingEngine bool
	StrictPolicyChecking      bool
}

type JobGroupPolicy

type JobGroupPolicy struct {
	Enabled       bool
	MaxCount      int
	MinCount      int
	ScaleOutCount int
	ScaleInCount  int
}

type Policies

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

func (*Policies) DeleteJobGroupPolicy

func (p *Policies) DeleteJobGroupPolicy(job, group string) error

func (*Policies) DeleteJobPolicy

func (p *Policies) DeleteJobPolicy(job string) error

func (*Policies) List

func (p *Policies) List() (*map[string]map[string]*JobGroupPolicy, error)

func (*Policies) ReadJobGroupPolicy

func (p *Policies) ReadJobGroupPolicy(job, group string) (*JobGroupPolicy, error)

func (*Policies) ReadJobPolicy

func (p *Policies) ReadJobPolicy(job string) (*map[string]*JobGroupPolicy, error)

func (*Policies) WriteJobGroupPolicy

func (p *Policies) WriteJobGroupPolicy(job, group string, policy []byte) error

func (*Policies) WriteJobPolicy

func (p *Policies) WriteJobPolicy(job string, policy []byte) 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) JobGroupIn

func (s *Scale) JobGroupIn(job, group string, count int) (*ScaleResp, error)

func (*Scale) JobGroupOut

func (s *Scale) JobGroupOut(job, group string, count int) (*ScaleResp, error)

type ScaleReq

type ScaleReq struct {
	Count int
}

type ScaleResp

type ScaleResp struct {
	EvaluationID string
}

type System

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

func (*System) Health

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

func (*System) Info

func (s *System) Info() (*InfoResp, error)

func (*System) Metrics

func (s *System) Metrics() (*metrics.MetricsSummary, 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