config

package
v0.0.0-...-f4ec7ef Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAsFloat

func GetAsFloat(value interface{}, defaultValue float64) (result float64)

GetAsFloat parses a string to a float or returns the float if float is passed in

func GetAsInt

func GetAsInt(value interface{}, defaultValue int) (result int)

GetAsInt parses a string/float to an int or returns the int if int is passed in

func GetAsMap

func GetAsMap(value interface{}) (result map[string]string)

GetAsMap parses a string to a map[string]string

func GetAsSlice

func GetAsSlice(value interface{}) []string

GetAsSlice : Parses a json array string to []string

func ReadCollectorConfig

func ReadCollectorConfig(configFile string) (c map[string]interface{}, e error)

ReadCollectorConfig reads a fullerite collector configuration file

Types

type Config

type Config struct {
	Prefix                string                            `json:"prefix"`
	Interval              interface{}                       `json:"interval"`
	CollectorsConfigPath  string                            `json:"collectorsConfigPath"`
	DiamondCollectorsPath string                            `json:"diamondCollectorsPath"`
	DiamondCollectors     []string                          `json:"diamondCollectors"`
	Handlers              map[string]map[string]interface{} `json:"handlers"`
	Collectors            []string                          `json:"collectors"`
	DefaultDimensions     map[string]string                 `json:"defaultDimensions"`
	InternalServerConfig  map[string]interface{}            `json:"internalServer"`
}

Config type holds the global Fullerite configuration.

func ReadConfig

func ReadConfig(configFile string) (c Config, e error)

ReadConfig reads a fullerite configuration file

Jump to

Keyboard shortcuts

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