Documentation ¶
Index ¶
- type FBAdapter
- type HTTPMonitor
- type Scope
- type StatsdScope
- func (s *StatsdScope) Dec(stat string, value int64) error
- func (s *StatsdScope) Gauge(stat string, value int64) error
- func (s *StatsdScope) GaugeDelta(stat string, value int64) error
- func (s *StatsdScope) Inc(stat string, value int64) error
- func (s *StatsdScope) NewScope(scopes ...string) Scope
- func (s *StatsdScope) Raw(stat string, value string) error
- func (s *StatsdScope) Scope() string
- func (s *StatsdScope) Set(stat string, value string) error
- func (s *StatsdScope) SetInt(stat string, value int64) error
- func (s *StatsdScope) Timing(stat string, delta int64) error
- func (s *StatsdScope) TimingDuration(stat string, delta time.Duration) error
- type Statter
- func (s Statter) Close() error
- func (s Statter) Dec(n string, v int64, r float32) error
- func (s Statter) Gauge(n string, v int64, r float32) error
- func (s Statter) GaugeDelta(n string, v int64, r float32) error
- func (s Statter) Inc(n string, v int64, r float32) error
- func (s Statter) Raw(n string, v string, r float32) error
- func (s Statter) Set(n string, v string, r float32) error
- func (s Statter) SetInt(n string, v int64, r float32) error
- func (s Statter) SetPrefix(p string)
- func (s Statter) Timing(n string, v int64, r float32) error
- func (s Statter) TimingDuration(n string, v time.Duration, r float32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FBAdapter ¶
type FBAdapter struct {
// contains filtered or unexported fields
}
FBAdapter provides a facebookgo/stats client interface that sends metrics via a StatsD client
func NewFBAdapter ¶
NewFBAdapter returns a new adapter
func (FBAdapter) BumpHistogram ¶
BumpHistogram isn't used by facebookgo/httpdown
type HTTPMonitor ¶
type HTTPMonitor struct {
// contains filtered or unexported fields
}
HTTPMonitor stores some server state
func NewHTTPMonitor ¶
NewHTTPMonitor returns a new initialized HTTPMonitor
func (*HTTPMonitor) ServeHTTP ¶
func (h *HTTPMonitor) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Scope ¶
type Scope interface { NewScope(scopes ...string) Scope Scope() string Inc(stat string, value int64) error Dec(stat string, value int64) error Gauge(stat string, value int64) error GaugeDelta(stat string, value int64) error Timing(stat string, delta int64) error TimingDuration(stat string, delta time.Duration) error Set(stat string, value string) error SetInt(stat string, value int64) error Raw(stat string, value string) error }
Scope is a stats collector that will prefix the name the stats it collects.
func NewNoopScope ¶
func NewNoopScope() Scope
NewNoopScope returns a Scope that won't collect anything
type StatsdScope ¶
type StatsdScope struct {
// contains filtered or unexported fields
}
StatsdScope is a Scope that sends data to statsd with a prefix added to the stat names.
func NewStatsdScope ¶
func NewStatsdScope(statter statsd.Statter, scopes ...string) *StatsdScope
NewStatsdScope returns a StatsdScope that prefixes stats it collections with the scopes given joined together by periods
func (*StatsdScope) Dec ¶
func (s *StatsdScope) Dec(stat string, value int64) error
Dec decrements the given stat and adds the Scope's prefix to the name
func (*StatsdScope) Gauge ¶
func (s *StatsdScope) Gauge(stat string, value int64) error
Gauge sends a gauge stat and adds the Scope's prefix to the name
func (*StatsdScope) GaugeDelta ¶
func (s *StatsdScope) GaugeDelta(stat string, value int64) error
GaugeDelta sends the change in a gauge stat and adds the Scope's prefix to the name
func (*StatsdScope) Inc ¶
func (s *StatsdScope) Inc(stat string, value int64) error
Inc increments the given stat and adds the Scope's prefix to the name
func (*StatsdScope) NewScope ¶
func (s *StatsdScope) NewScope(scopes ...string) Scope
NewScope generates a new Scope prefixed by this Scope's prefix plus the prefixes given joined by periods
func (*StatsdScope) Raw ¶
func (s *StatsdScope) Raw(stat string, value string) error
Raw sends a stat value without interpretation and adds the Scope's prefix to the name
func (*StatsdScope) Scope ¶
func (s *StatsdScope) Scope() string
Scope returns the current string prefix (except for the final period) that stats will receive
func (*StatsdScope) Set ¶
func (s *StatsdScope) Set(stat string, value string) error
Set sets a stat's new value and adds the Scope's prefix to the name
func (*StatsdScope) SetInt ¶
func (s *StatsdScope) SetInt(stat string, value int64) error
SetInt sets a stat's integer value and adds the Scope's prefix to the name
func (*StatsdScope) Timing ¶
func (s *StatsdScope) Timing(stat string, delta int64) error
Timing sends a latency stat and adds the Scope's prefix to the name
func (*StatsdScope) TimingDuration ¶
func (s *StatsdScope) TimingDuration(stat string, delta time.Duration) error
TimingDuration sends a latency stat as a time.Duration and adds the Scope's prefix to the name
type Statter ¶
type Statter struct {
// contains filtered or unexported fields
}
Statter implements the statsd.Statter interface but appends the name of the host the process is running on and its PID to the end of every stat name
func NewStatter ¶
NewStatter returns a new statsd.Client wrapper
func (Statter) GaugeDelta ¶
GaugeDelta wraps statsd.Client.GaugeDelta