Documentation ¶
Overview ¶
Package metrics is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsInterface ¶
type MetricsInterface interface {
RecordFromCodec(codec codec.CodecInterface)
}
MetricsInterface represents the metrics interface for all available providers
type MockMetricsInterface ¶
type MockMetricsInterface struct {
// contains filtered or unexported fields
}
MockMetricsInterface is a mock of MetricsInterface interface.
func NewMockMetricsInterface ¶
func NewMockMetricsInterface(ctrl *gomock.Controller) *MockMetricsInterface
NewMockMetricsInterface creates a new mock instance.
func (*MockMetricsInterface) EXPECT ¶
func (m *MockMetricsInterface) EXPECT() *MockMetricsInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMetricsInterface) RecordFromCodec ¶
func (m *MockMetricsInterface) RecordFromCodec(codec codec.CodecInterface)
RecordFromCodec mocks base method.
type MockMetricsInterfaceMockRecorder ¶
type MockMetricsInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockMetricsInterfaceMockRecorder is the mock recorder for MockMetricsInterface.
func (*MockMetricsInterfaceMockRecorder) RecordFromCodec ¶
func (mr *MockMetricsInterfaceMockRecorder) RecordFromCodec(codec interface{}) *gomock.Call
RecordFromCodec indicates an expected call of RecordFromCodec.
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
Prometheus represents the prometheus struct for collecting metrics
func NewPrometheus ¶
func NewPrometheus(service string, options ...PrometheusOption) *Prometheus
NewPrometheus initializes a new prometheus metric instance
func (*Prometheus) RecordFromCodec ¶
func (m *Prometheus) RecordFromCodec(codec codec.CodecInterface)
RecordFromCodec sends the given codec into the codec channel to be read from recorder
type PrometheusOption ¶
type PrometheusOption func(*Prometheus)
PrometheusOption is a type for defining Prometheus options
func WithCodecChannel ¶
func WithCodecChannel(codecChannel chan codec.CodecInterface) PrometheusOption
WithCodecChannel sets the prometheus codec channel
func WithNamespace ¶
func WithNamespace(namespace string) PrometheusOption
WithNamespace sets the prometheus namespace
func WithRegisterer ¶
func WithRegisterer(registerer prometheus.Registerer) PrometheusOption
WithRegisterer sets the prometheus registerer