metricsd

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultCollectInterval = 10 * time.Minute
	DefaultUnits           = "1024"
	DefaultCost            = "0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
}

type Backups

type Backups struct {
	Enabled     bool   `json:"enabled" toml:"enabled"`
	StorageUnit string `json:"storage_unit" toml:"storage_unit"`
	CostPerHour string `json:"cost_per_hour" toml:"cost_per_hour"`
}

type Config

type Config struct {
	Enabled         bool          `toml:"enabled"`
	CollectInterval toml.Duration `toml:"collect_interval"`
	Deployd         *Deployd      `json:"deployd" toml:"deployd"`
	Dockerd         *Dockerd      `json:"dockerd" toml:"dockerd"`
	Snapshots       *Snapshots    `json:"snapshots" toml:"snapshots"`
	Backups         *Backups      `json:"backups" toml:"backups"`
	Skews           *Skews        `json:"skews" toml:"skews"`
}

func NewConfig

func NewConfig() *Config

func (Config) String

func (c Config) String() string

type Deployd

type Deployd struct {
	Enabled bool `json:"enabled" toml:"enabled"`
	Units
}

type Dockerd

type Dockerd struct {
	Enabled bool `json:"enabled" toml:"enabled"`
	Units
}

type Handler

type Handler struct {
	EventChannel chan bool
}

func NewHandler

func NewHandler() *Handler

type Service

type Service struct {
	Handler *Handler

	Meta    *meta.Config
	Deployd *deployd.Config
	Dockerd *docker.Config
	Config  *Config
	Storage *storage.Config
	// contains filtered or unexported fields
}

Service manages the listener and handler for an HTTP endpoint.

func NewService

func NewService(c *meta.Config, one *deployd.Config, doc *docker.Config, f *Config, strg *storage.Config) *Service

NewService returns a new instance of Service.

func (*Service) Close

func (s *Service) Close() error

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal errors that occur on the listener.

func (*Service) Open

func (s *Service) Open() error

Open starts the service

type Skews

type Skews struct {
	Enabled         bool          `json:"enabled" toml:"enabled"`
	SoftGracePeriod toml.Duration `json:"soft_grace_period" toml:"soft_grace_period"`
	SoftLimit       string        `json:"soft_limit" toml:"soft_limit"`
	HardGracePeriod toml.Duration `json:"hard_grace_period" toml:"hard_grace_period"`
	HardLimit       string        `json:"hard_limit" toml:"hard_limit"`
}

type Snapshots

type Snapshots struct {
	Enabled     bool   `json:"enabled" toml:"enabled"`
	StorageUnit string `json:"storage_unit" toml:"storage_unit"`
	CostPerHour string `json:"cost_per_hour" toml:"cost_per_hour"`
}

type Units

type Units struct {
	CpuUnit    string `json:"cpu_unit" toml:"cpu_unit"`
	MemoryUnit string `json:"memory_unit" toml:"memory_unit"`
	DiskUnit   string `json:"disk_unit" toml:"disk_unit"`
}

Jump to

Keyboard shortcuts

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