fullerite: github.com/Yelp/fullerite/src/fullerite/config Index | Files

package config

import "github.com/Yelp/fullerite/src/fullerite/config"

Index

Package Files

config.go

func GetAsBool Uses

func GetAsBool(value interface{}, defaultValue bool) (result bool)

GetAsBool uses ParseBool, will match on real bool or strings that looks like booleans

func GetAsFloat Uses

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 Uses

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 Uses

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

GetAsMap parses a string to a map[string]string

func GetAsSlice Uses

func GetAsSlice(value interface{}) []string

GetAsSlice : Parses a json array string to []string

func ReadCollectorConfig Uses

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

ReadCollectorConfig reads a fullerite collector configuration file

type Config Uses

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 Uses

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

ReadConfig reads a fullerite configuration file

func (Config) GetCollectorConfig Uses

func (conf Config) GetCollectorConfig(name string) (map[string]interface{}, error)

GetCollectorConfig returns collector config. given a name

Package config imports 6 packages (graph). Updated 2019-06-01. Refresh now. Tools for package owners.