Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MappedMetrics ¶
type MappedMetrics struct { Counters map[string]prometheus.Counter Histograms map[string]prometheus.Histogram Gauges map[string]prometheus.Gauge }
MappedMetrics
Contains the concrete metrics defined by the service. This is passed to the configuration
type Metered ¶
type Metered interface { // Metrics // // Returns a set of definitions for the MappedMetrics. This will provide the metrics // wrapper with definitions that will be used for your service. This object will be // re-used and passed along to the UpdateMetrics function after every request. Metrics() *MappedMetrics // UpdateMetrics // // Called after every response sent from the wrapped service. This gathers the necessary // data points so that metrics may be derived from the service call. The MappedMetrics // contain all metrics mapped for only the implementing service. UpdateMetrics(ctx context.Context, request interface{}, response interface{}, startTime time.Time, mappedMetrics *MappedMetrics) service.Service }
Metered
This interface indicates that the service will maintain its ability to serve but also enable the processing of metrics after each request. The ProcessRequestMetrics function will be called on the deferred stack as a result of the automatic wiring.
Click to show internal directories.
Click to hide internal directories.