Documentation ¶
Index ¶
- Variables
- func InitMetrics(c *Client)
- func SetID(id string)
- func SetPusher(addr, username, password string) error
- func Start() error
- func Stop()
- type Client
- func (c *Client) NewCounter(name string, labels []string) Counter
- func (c *Client) NewGauge(name string, labels []string) Gauge
- func (c *Client) NewSummary(name string, labels []string) Summary
- func (c *Client) SetID(id string)
- func (c *Client) SetPusher(addr, username, password string) error
- func (c *Client) Start() error
- func (c *Client) Stop()
- type Counter
- type Gauge
- type PromCounter
- type PromGauge
- type PromSummary
- type Summary
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilPusher = errors.New("pusher is nil") )
errors
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the struct responsible for sending different type of metrics.
func (*Client) NewCounter ¶
NewCounter returns a counter-type metrics.
func (*Client) NewSummary ¶
NewSummary returns a summary-type metrics.
type Counter ¶
Counter defines the API of counter-type metrics.
func NewCounter ¶
NewCounter returns a counter-type metrics.
type PromCounter ¶
type PromCounter struct {
// contains filtered or unexported fields
}
PromCounter is the implementation of Counter with prometheus's CounterVec.
func NewPromCounter ¶
func NewPromCounter(c *prometheus.CounterVec) *PromCounter
NewPromCounter returns a instance of PromCounter.
type PromGauge ¶
type PromGauge struct {
// contains filtered or unexported fields
}
PromGauge is the implementation of Gauge with prometheus's GaugeVec.
func NewPromGauge ¶
func NewPromGauge(g *prometheus.GaugeVec) *PromGauge
NewPromGauge returns a instance of PromGauge.
type PromSummary ¶
type PromSummary struct {
// contains filtered or unexported fields
}
PromSummary is the implementation of Summary with prometheus's SummaryVec.
func NewPromSummary ¶
func NewPromSummary(s *prometheus.SummaryVec) *PromSummary
NewPromSummary returns a instance of PromSummary.
Click to show internal directories.
Click to hide internal directories.