Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrometheusCounter ¶
func NewPrometheusCounter( serviceName string, cacheName string, counterType string, ) prometheus.Counter
NewPrometheusCounter creates a new prometheus counter serviceName: the name of the service cacheName: the name of the cache counterType: the type of the counter build the counter name as: serviceName_counterType_total
Types ¶
type PrometheusReporter ¶
type PrometheusReporter struct {
// contains filtered or unexported fields
}
PrometheusReporter is a reporter that reports to prometheus
func NewPrometheusReporter ¶
func NewPrometheusReporter( serviceName string, cacheName string, ) *PrometheusReporter
NewPrometheusReporter creates a new prometheus reporter using NewPrometheusCounter to create the counters
func (*PrometheusReporter) ReportHit ¶
func (pr *PrometheusReporter) ReportHit()
ReportHit reports a cache hit
func (*PrometheusReporter) ReportMiss ¶
func (pr *PrometheusReporter) ReportMiss()
ReportMiss reports a cache miss
Click to show internal directories.
Click to hide internal directories.