Documentation ¶
Index ¶
- type DummyMetricsEmitterPool
- func (d DummyMetricsEmitterPool) GetDefaultMetricsEmitter() metrics.MetricEmitter
- func (d DummyMetricsEmitterPool) GetMetricsEmitter(_ interface{}) (metrics.MetricEmitter, error)
- func (d DummyMetricsEmitterPool) Run(_ context.Context)
- func (d DummyMetricsEmitterPool) SetDefaultMetricsEmitter(_ metrics.MetricEmitter)
- type MetricsEmitterPool
- type PrometheusMetricOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyMetricsEmitterPool ¶
type DummyMetricsEmitterPool struct{}
func (DummyMetricsEmitterPool) GetDefaultMetricsEmitter ¶
func (d DummyMetricsEmitterPool) GetDefaultMetricsEmitter() metrics.MetricEmitter
func (DummyMetricsEmitterPool) GetMetricsEmitter ¶
func (d DummyMetricsEmitterPool) GetMetricsEmitter(_ interface{}) (metrics.MetricEmitter, error)
func (DummyMetricsEmitterPool) Run ¶
func (d DummyMetricsEmitterPool) Run(_ context.Context)
func (DummyMetricsEmitterPool) SetDefaultMetricsEmitter ¶
func (d DummyMetricsEmitterPool) SetDefaultMetricsEmitter(_ metrics.MetricEmitter)
type MetricsEmitterPool ¶
type MetricsEmitterPool interface { // GetDefaultMetricsEmitter returns the default metrics.MetricEmitter // that should be handled by this mux; while SetDefaultMetricsEmitter // provides a way to set the default metrics.MetricEmitter GetDefaultMetricsEmitter() metrics.MetricEmitter SetDefaultMetricsEmitter(metricEmitter metrics.MetricEmitter) // GetMetricsEmitter returns the specific metrics.MetricEmitter. // the parameters are used for certain pool implementation to parse request info. // we will always try to get emitter from local cache, and creating one if not exist. GetMetricsEmitter(parameters interface{}) (metrics.MetricEmitter, error) // Run starts the syncing logic of emitter pool implementations Run(ctx context.Context) }
MetricsEmitterPool is a metrics emitter pool for metrics emitter. it stores all the emitter implementations, and provide a getter function to acquire them. this thought is much like the thread pool.
func NewCustomMetricsEmitterPool ¶
func NewCustomMetricsEmitterPool(emitterPool MetricsEmitterPool) MetricsEmitterPool
func NewOpenTelemetryPrometheusMetricsEmitterPool ¶
func NewOpenTelemetryPrometheusMetricsEmitterPool(genericConf *generic.MetricsConfiguration, mux *http.ServeMux) (MetricsEmitterPool, error)
type PrometheusMetricOptions ¶
type PrometheusMetricOptions struct {
Path metrics.PrometheusMetricPathName
}
Click to show internal directories.
Click to hide internal directories.