Documentation ¶
Index ¶
- Variables
- type AtomicFloat64
- type Counter
- type DummyRegistry
- type Gauge
- type GraphiteClient
- func (c *GraphiteClient) Close() error
- func (c *GraphiteClient) Counter(name string, labels Labels) Counter
- func (c *GraphiteClient) Flush(now time.Time) error
- func (c *GraphiteClient) FlushInBackground(ctx context.Context, flushEvery time.Duration)
- func (c *GraphiteClient) Gauge(name string, labels Labels) Gauge
- func (c *GraphiteClient) Histogram(name string, labels Labels, buckets []float64) Histogram
- func (c *GraphiteClient) WithPrefix(prefix string) Registry
- type GraphiteCounter
- type GraphiteGauge
- func (g *GraphiteGauge) Add(delta float64)
- func (g *GraphiteGauge) Dec()
- func (g *GraphiteGauge) Inc()
- func (g *GraphiteGauge) Reset() (float64, bool)
- func (g *GraphiteGauge) Set(value float64)
- func (g *GraphiteGauge) Sub(delta float64)
- func (g *GraphiteGauge) Write(b *strings.Builder, now string, key string)
- type GraphiteHistogram
- type GraphiteMetric
- type Histogram
- type Label
- type Labeled
- type Labels
- func (l Labels) Add(key string, value interface{}) Labels
- func (l Labels) AddAll(labels Labels) Labels
- func (l Labels) Key(key string) Labels
- func (l Labels) Keys() []string
- func (l Labels) Map() map[string]interface{}
- func (l Labels) Path(sep, esc string) string
- func (l Labels) StringMap() map[string]string
- type PrometheusListener
- func (p *PrometheusListener) Close() error
- func (p *PrometheusListener) CloseWithContext(ctx context.Context) error
- func (p *PrometheusListener) Counter(name string, labels Labels) Counter
- func (p *PrometheusListener) Gauge(name string, labels Labels) Gauge
- func (p *PrometheusListener) Histogram(name string, labels Labels, buckets []float64) Histogram
- func (p *PrometheusListener) MustRegister(cs ...prometheus.Collector) *PrometheusListener
- func (p *PrometheusListener) WithPrefix(prefix string) Registry
- type Registry
Constants ¶
This section is empty.
Variables ¶
View Source
var GraphiteTimeout = 1 * time.Minute
Functions ¶
This section is empty.
Types ¶
type AtomicFloat64 ¶
type AtomicFloat64 uint64
func (*AtomicFloat64) Add ¶
func (f *AtomicFloat64) Add(delta float64)
func (*AtomicFloat64) Get ¶
func (f *AtomicFloat64) Get() float64
func (*AtomicFloat64) Set ¶
func (f *AtomicFloat64) Set(value float64)
func (*AtomicFloat64) Swap ¶
func (f *AtomicFloat64) Swap(value float64) float64
type DummyRegistry ¶
func (DummyRegistry) Histogram ¶
func (d DummyRegistry) Histogram(name string, labels Labels, buckets []float64) Histogram
func (DummyRegistry) WithPrefix ¶
func (d DummyRegistry) WithPrefix(prefix string) Registry
type GraphiteClient ¶
type GraphiteClient struct { Address string HGBF string Metrics map[string]GraphiteMetric Mutex *flu.RWMutex // contains filtered or unexported fields }
func (*GraphiteClient) Close ¶
func (c *GraphiteClient) Close() error
func (*GraphiteClient) Counter ¶
func (c *GraphiteClient) Counter(name string, labels Labels) Counter
func (*GraphiteClient) FlushInBackground ¶
func (c *GraphiteClient) FlushInBackground(ctx context.Context, flushEvery time.Duration)
func (*GraphiteClient) Histogram ¶
func (c *GraphiteClient) Histogram(name string, labels Labels, buckets []float64) Histogram
func (*GraphiteClient) WithPrefix ¶
func (c *GraphiteClient) WithPrefix(prefix string) Registry
type GraphiteCounter ¶
type GraphiteCounter AtomicFloat64
func (*GraphiteCounter) Add ¶
func (c *GraphiteCounter) Add(delta float64)
func (*GraphiteCounter) Inc ¶
func (c *GraphiteCounter) Inc()
func (*GraphiteCounter) Reset ¶
func (c *GraphiteCounter) Reset() (float64, bool)
type GraphiteGauge ¶
type GraphiteGauge AtomicFloat64
func (*GraphiteGauge) Add ¶
func (g *GraphiteGauge) Add(delta float64)
func (*GraphiteGauge) Dec ¶
func (g *GraphiteGauge) Dec()
func (*GraphiteGauge) Inc ¶
func (g *GraphiteGauge) Inc()
func (*GraphiteGauge) Reset ¶
func (g *GraphiteGauge) Reset() (float64, bool)
func (*GraphiteGauge) Set ¶
func (g *GraphiteGauge) Set(value float64)
func (*GraphiteGauge) Sub ¶
func (g *GraphiteGauge) Sub(delta float64)
type GraphiteHistogram ¶
type GraphiteHistogram struct {
// contains filtered or unexported fields
}
func (GraphiteHistogram) Observe ¶
func (h GraphiteHistogram) Observe(value float64)
type GraphiteMetric ¶
type PrometheusListener ¶
type PrometheusListener struct {
// contains filtered or unexported fields
}
func NewPrometheusListener ¶
func NewPrometheusListener(address string) *PrometheusListener
func (*PrometheusListener) Close ¶
func (p *PrometheusListener) Close() error
func (*PrometheusListener) CloseWithContext ¶
func (p *PrometheusListener) CloseWithContext(ctx context.Context) error
func (*PrometheusListener) Counter ¶
func (p *PrometheusListener) Counter(name string, labels Labels) Counter
func (*PrometheusListener) Gauge ¶
func (p *PrometheusListener) Gauge(name string, labels Labels) Gauge
func (*PrometheusListener) Histogram ¶
func (p *PrometheusListener) Histogram(name string, labels Labels, buckets []float64) Histogram
func (*PrometheusListener) MustRegister ¶
func (p *PrometheusListener) MustRegister(cs ...prometheus.Collector) *PrometheusListener
func (*PrometheusListener) WithPrefix ¶
func (p *PrometheusListener) WithPrefix(prefix string) Registry
Click to show internal directories.
Click to hide internal directories.