api

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Start the API listener

Types

type FloatValueBuilder

type FloatValueBuilder struct {
	RuleName       string          `json:"rule"`
	ServiceName    string          `json:"service"`
	ScalerID       string          `json:"scaler"`
	ProbeID        string          `json:"probe"`
	ProbeArgs      json.RawMessage `json:"probeArgs"`
	RefreshRate    time.Duration   `json:"resfreshRate"`
	UpDefinition   string          `json:"up"`
	DownDefinition string          `json:"down"`
}

FloatValueBuilder contains all the information to build a rule

func (*FloatValueBuilder) Build

func (builder *FloatValueBuilder) Build() (*rule.FloatValue, error)

Build validate inputed data and return a FloatValue rule It checks missing fields and coherence why the loaded configuration

type ScalerBuilder

type ScalerBuilder struct {
	Type string          `json:"type"`
	Name string          `json:"name"`
	Args json.RawMessage `json:"args"`
}

ScalerBuilder contains all the information needed to build a scaler

func (*ScalerBuilder) Build

func (sb *ScalerBuilder) Build() (types.Scaler, error)

Build validate inputed data and return a specific scaler wrapped in interface

Jump to

Keyboard shortcuts

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