Documentation
¶
Index ¶
- type PrometheusReporter
- func (p *PrometheusReporter) ReportCount(metric string, labels map[string]string, count float64) error
- func (p *PrometheusReporter) ReportGauge(metric string, labels map[string]string, value float64) error
- func (p *PrometheusReporter) ReportHistogram(metric string, labels map[string]string, value float64) error
- func (p *PrometheusReporter) ReportSummary(metric string, labels map[string]string, value float64) error
- type Reporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusReporter ¶
type PrometheusReporter struct {
// contains filtered or unexported fields
}
PrometheusReporter reports metrics to prometheus
func GetPrometheusReporter ¶
func GetPrometheusReporter(game string, port int, constLabels map[string]string, postMetricsScrapeAction func()) *PrometheusReporter
GetPrometheusReporter gets the prometheus reporter singleton
func (*PrometheusReporter) ReportCount ¶
func (p *PrometheusReporter) ReportCount(metric string, labels map[string]string, count float64) error
ReportCount reports a summary metric
- implements the ReportCount method of the Reporter interface
func (*PrometheusReporter) ReportGauge ¶
func (p *PrometheusReporter) ReportGauge(metric string, labels map[string]string, value float64) error
ReportGauge reports a gauge metric
- implements the ReportGauge method of the Reporter interface
func (*PrometheusReporter) ReportHistogram ¶
func (p *PrometheusReporter) ReportHistogram(metric string, labels map[string]string, value float64) error
ReportHistogram reports a summary metric
- implements the ReportHistogram method of the Reporter interface
func (*PrometheusReporter) ReportSummary ¶
func (p *PrometheusReporter) ReportSummary(metric string, labels map[string]string, value float64) error
ReportSummary reports a summary metric
- implements the ReportSummary method of the Reporter interface
type Reporter ¶
type Reporter interface { ReportCount(metric string, tags map[string]string, count float64) error ReportSummary(metric string, tags map[string]string, value float64) error ReportHistogram(metric string, tags map[string]string, value float64) error ReportGauge(metric string, tags map[string]string, value float64) error }
Reporter interface
Click to show internal directories.
Click to hide internal directories.