Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt interface {
UnmarshalConfig(data []byte, fname string, logger *zap.Logger) (Config, error)
}
Opt is an interface for config unmarshaled in local configuration files.
type Reporter ¶
type Reporter interface { // ReportCounter reports a counter value ReportCounter(name string, tags Tags, value int64) // ReportGauge reports a gauge value ReportGauge(name string, tags Tags, value int64) // RecordTimer RecordTimer(name string, tags Tags, d time.Duration) // Flush is expected to be called by a Scope when it completes a round or reporting Flush() // Close conducts a clean exit for the stats reporting. Close() error }
Reporter is an interface for stats reporting functions. Its methods take optional tag dictionaries which may be ignored by concrete implementations.
type StatsdConfig ¶
type StatsdConfig struct {
Metrics struct {
Statsd *statsdFileConfig `yaml:"statsd"`
} `yaml:"metrics"`
}
StatsdConfig implements metrics.Config.
func (StatsdConfig) NewReporter ¶
func (c StatsdConfig) NewReporter(logger *zap.Logger) (Reporter, error)
NewReporter creates a new metrics backend talking to Statsd.
type StatsdConfiger ¶
type StatsdConfiger struct{}
StatsdConfiger implements metrics.Opt.
func (StatsdConfiger) UnmarshalConfig ¶
func (c StatsdConfiger) UnmarshalConfig(data []byte, fname string, logger *zap.Logger) (Config, error)
UnmarshalConfig fetches the configuration file from local path.
Click to show internal directories.
Click to hide internal directories.