Documentation ¶
Index ¶
- func ConfigureOutputs(cfg *Config) (err error)
- func Exp()
- func GetOrRegister(name string, i interface{}) interface{}
- func GetOrRegisterCounter(name string) gom.Counter
- func GetOrRegisterGauge(name string) gom.Gauge
- func GetOrRegisterHistogram(name string, sample gom.Sample) gom.Histogram
- func GetOrRegisterMeter(name string) gom.Meter
- func GetOrRegisterTimer(name string) gom.Timer
- func NewFileOutput(cfg *Config) (err error)
- func NewHTTPServer(cfg *Config) (err error)
- func Register(name string, i interface{}) error
- func Unregister(name string)
- func UnregisterAll()
- type Config
- type HTTPConfig
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureOutputs ¶
ConfigureOutputs will take the specified config and enable the required outputs.
func GetOrRegister ¶
func GetOrRegister(name string, i interface{}) interface{}
func GetOrRegisterCounter ¶
func GetOrRegisterGauge ¶
func GetOrRegisterHistogram ¶
func GetOrRegisterMeter ¶
func GetOrRegisterTimer ¶
func NewFileOutput ¶
NewFileOutput configures a log to periodically write metrics to.
func NewHTTPServer ¶
NewHTTPServer sets up an HTTP server to export metrics to (if enabled) Metrics will be hosted at http://localhost:<port>/debug/metrics, where <port> is the configured port number.
func Unregister ¶
func Unregister(name string)
func UnregisterAll ¶
func UnregisterAll()
Types ¶
type Config ¶
type Config struct { Enabled bool `yaml:"enabled"` Runtime bool `yaml:"runtime"` FileOutput *out.Config `yaml:"file"` HTTPOutput *HTTPConfig `yaml:"http"` }
Config defines output settings for metrics
func ConfigFromMap ¶
ConfigFromMap returns a Config based on map values. Used with spf13/viper.
type HTTPConfig ¶
HTTPConfig defines the HTTP server to host metrics data on
Click to show internal directories.
Click to hide internal directories.