chemtrail: github.com/jrasell/chemtrail/pkg/api Index | Files

package api

import "github.com/jrasell/chemtrail/pkg/api"

Index

Package Files

api.go policy.go request.go scale.go system.go

type Check Uses

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

type Client Uses

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

func NewClient Uses

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

func (*Client) Policy Uses

func (c *Client) Policy() *Policy

func (*Client) Scale Uses

func (c *Client) Scale() *Scale

func (*Client) System Uses

func (c *Client) System() *System

type Config Uses

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

func DefaultConfig Uses

func DefaultConfig(cfg *clientCfg.Config) *Config

func (*Config) ConfigureTLS Uses

func (c *Config) ConfigureTLS() error

type HealthResp Uses

type HealthResp struct {
    Status string
}

type Policy Uses

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

func (*Policy) Delete Uses

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

func (*Policy) Info Uses

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

func (*Policy) List Uses

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

func (*Policy) Write Uses

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

type QueryOptions Uses

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 Uses

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

func (*Scale) In Uses

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

func (*Scale) Out Uses

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

func (*Scale) StatusInfo Uses

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

func (*Scale) StatusList Uses

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

type ScaleResp Uses

type ScaleResp struct {
    ID string
}

type ScalingPolicy Uses

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 Uses

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

func (*System) Health Uses

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

func (*System) Metrics Uses

func (s *System) Metrics() (*metrics.MetricsSummary, error)

Metrics returns the currently stored telemetry information from a Chemtrail server.

type TLSConfig Uses

type TLSConfig struct {
    CACert        string
    ClientCert    string
    ClientCertKey string
}

Package api imports 15 packages (graph) and is imported by 9 packages. Updated 2019-12-30. Refresh now. Tools for package owners.