Documentation
¶
Index ¶
- Variables
- func Count(name string, value int64, tags MapTag) (errs []error)
- func Gauge(name string, value float64, tags MapTag) (errs []error)
- func Histogram(name string, startTime time.Time, tags MapTag) (errs []error)
- func NewGlobal(v Vendor, conf Config) error
- func NewGlobals(vs []Vendor, conf Config) (errs []error)
- type Config
- type Datadog
- type MapTag
- type Monitor
- type Vendor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERR_INVALID_VENDOR = errors.New("invalid vendor") ERR_MISSING_CONFIG = errors.New("config is missing") )
Errors
Functions ¶
func NewGlobal ¶
NewGlobal acts like New but will add the result into global, so user can directly call the function.
func NewGlobals ¶
NewGlobals is multi NewGlobal.
Types ¶
type Config ¶
type Config struct {
Datadog *Datadog
}
Config provides list of monitor's vendor that can be used. It will prioritize from top to bottom and only choose one.
type Datadog ¶
type Datadog struct {
Host string
Namespace string
GlobalTags MapTag
// contains filtered or unexported fields
}
Datadog is config for datadog's log.
type MapTag ¶
MapTag is default standard for all monitor's tag.
Cons: performance issue due convert from MapTag to desired type.
type Monitor ¶
type Monitor interface {
// Count tracks how many event occur.
Count(name string, value int64, tags MapTag) error
// Gauge tracks event's time.
Gauge(name string, value float64, tags MapTag) error
// Histogram tracks statistical distribution.
Histogram(name string, startTime time.Time, tags MapTag) error
}
Monitor provides list of standard's monitor functions.
Click to show internal directories.
Click to hide internal directories.