Documentation
¶
Index ¶
- func UseConstruct(f func())
- type Client
- func (c *Client) AddCounter(opts prometheus.CounterOpts) prometheus.Counter
- func (c *Client) AddCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec
- func (c *Client) AddGauge(opts prometheus.GaugeOpts) prometheus.Gauge
- func (c *Client) AddGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec
- func (c *Client) AddHistogram(opts prometheus.HistogramOpts) prometheus.Histogram
- func (c *Client) AddHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec
- func (c *Client) AddSummary(opts prometheus.SummaryOpts) prometheus.Summary
- func (c *Client) AddSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *prometheus.SummaryVec
- func (c *Client) ListenAndServe(addr string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UseConstruct ¶
func UseConstruct(f func())
UseConstruct add function f. Function f will be executed every time just after request received.
Types ¶
type Client ¶
type Client struct { ServiceName string Path string // Enable metrics of runtime. Default enabled. EnableRuntime bool // Labels which will always be attached to metrics. ConstLabels prometheus.Labels // contains filtered or unexported fields }
Client represents the client for prometheus server to pull data from.
func (*Client) AddCounter ¶
func (c *Client) AddCounter(opts prometheus.CounterOpts) prometheus.Counter
func (*Client) AddCounterVec ¶
func (c *Client) AddCounterVec( opts prometheus.CounterOpts, labelNames []string, ) *prometheus.CounterVec
func (*Client) AddGauge ¶
func (c *Client) AddGauge(opts prometheus.GaugeOpts) prometheus.Gauge
func (*Client) AddGaugeVec ¶
func (c *Client) AddGaugeVec( opts prometheus.GaugeOpts, labelNames []string, ) *prometheus.GaugeVec
func (*Client) AddHistogram ¶
func (c *Client) AddHistogram(opts prometheus.HistogramOpts) prometheus.Histogram
func (*Client) AddHistogramVec ¶
func (c *Client) AddHistogramVec( opts prometheus.HistogramOpts, labelNames []string, ) *prometheus.HistogramVec
func (*Client) AddSummary ¶
func (c *Client) AddSummary(opts prometheus.SummaryOpts) prometheus.Summary
func (*Client) AddSummaryVec ¶
func (c *Client) AddSummaryVec( opts prometheus.SummaryOpts, labelNames []string, ) *prometheus.SummaryVec
func (*Client) ListenAndServe ¶
ListenAndServe listen on the addr and provide access for prometheus server to pull data.
Click to show internal directories.
Click to hide internal directories.