types

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: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Orchestrator OrchestratorConfig
	Scalers      map[string]Scaler
	Rules        map[string]Rule
	Errchan      chan error
}

Configuration holder

type OrchestratorConfig

type OrchestratorConfig struct {
	Engine        string // docker, kubernetes, mesos...
	Endpoint      string // http adress:port or unix socket
	TLSCACertPath string // ca cert path, PEM formated
	TLSCertPath   string // user cert path, PEM formated
	TLSKeyPath    string // user private key path, PEM formated
	TLS           bool   // TLS activation status
}

OrchestratorConfig hold all necessary connection informations

type Probe

type Probe interface {
	Name() string
	Value() (float64, error)
}

Probe interface

type Rule

type Rule interface {
	Check() error                 // performe a check on the target and act if needed
	CheckInterval() time.Duration // time to wait between each check
	JSON() ([]byte, error)        // return a JSON output
}

A Rule must be able to perform a check

type Scaler

type Scaler interface {
	Describe() string
	Up() error
	Down() error
	JSON() ([]byte, error)
}

Scaler control the service

Jump to

Keyboard shortcuts

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