config

package
v0.0.0-...-47c9800 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package config contains the datastructures representing the configuration of proxima.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// Name of configuration
	Name string `yaml:"name"`
	// The influx backends
	Influxes InfluxList `yaml:"influxes"`
	// The scotty servers
	Scotties ScottyList `yaml:"scotties"`
}

Database represents a single named configuration within proxima.

func (*Database) UnmarshalYAML

func (d *Database) UnmarshalYAML(
	unmarshal func(interface{}) error) error

type Influx

type Influx struct {
	// http://someHost.com:1234.
	HostAndPort string `yaml:"hostAndPort"`
	// The duration in this instance's retention policy
	Duration time.Duration `yaml:"duration"`
	// The influx Database to use
	Database string `yaml:"database"`
}

Influx represents a single influx backend.

func (*Influx) UnmarshalYAML

func (i *Influx) UnmarshalYAML(
	unmarshal func(interface{}) error) error

type InfluxList

type InfluxList []Influx

InfluxList represents a group of influx backends. InfluxList instances are to be treated as immutable.

func (InfluxList) Order

func (i InfluxList) Order() InfluxList

Order returns an InfluxList like this one but ordered by duration in descending order

type Proxima

type Proxima struct {
	Dbs []Database `yaml:"databases"`
}

Proxima represents the configuration of proxima. This is what is read from the configuration file using the yamlutil package.

func (*Proxima) Reset

func (p *Proxima) Reset()

func (*Proxima) UnmarshalYAML

func (p *Proxima) UnmarshalYAML(
	unmarshal func(interface{}) error) error

type Scotty

type Scotty struct {
	// http://someHost.com:1234.
	HostAndPort string `yaml:"hostAndPort"`
	// Scotty servers have the same data
	Scotties ScottyList `yaml:"scotties"`
	// Scotty servers have different data
	Partials ScottyList `yaml:"partials"`
}

Scotty represents a single scotty server, a list of redundant scotty servers each having the same data, or a list of scotty servers where each scotty server has different data. One and only one of the fields must be filled in.

func (*Scotty) UnmarshalYAML

func (s *Scotty) UnmarshalYAML(
	unmarshal func(interface{}) error) error

type ScottyList

type ScottyList []Scotty

ScottyList represents a group of scotty servers. ScottyList instances are to be treated as immutable.

Jump to

Keyboard shortcuts

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