Documentation ¶
Overview ¶
Package redis is a generated GoMock package.
Index ¶
- type Config
- type Metrics
- type MockMetrics
- func (m *MockMetrics) DeltaUpDownCounter(ctx context.Context, name string, value float64, labels ...string)
- func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder
- func (m *MockMetrics) IncrementCounter(ctx context.Context, name string, labels ...string)
- func (m *MockMetrics) RecordHistogram(ctx context.Context, name string, value float64, labels ...string)
- func (m *MockMetrics) SetGauge(name string, value float64)
- type MockMetricsMockRecorder
- func (mr *MockMetricsMockRecorder) DeltaUpDownCounter(ctx, name, value interface{}, labels ...interface{}) *gomock.Call
- func (mr *MockMetricsMockRecorder) IncrementCounter(ctx, name interface{}, labels ...interface{}) *gomock.Call
- func (mr *MockMetricsMockRecorder) RecordHistogram(ctx, name, value interface{}, labels ...interface{}) *gomock.Call
- func (mr *MockMetricsMockRecorder) SetGauge(name, value interface{}) *gomock.Call
- type QueryLog
- type Redis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶ added in v0.3.0
type Metrics interface { IncrementCounter(ctx context.Context, name string, labels ...string) DeltaUpDownCounter(ctx context.Context, name string, value float64, labels ...string) RecordHistogram(ctx context.Context, name string, value float64, labels ...string) SetGauge(name string, value float64) }
type MockMetrics ¶ added in v0.3.0
type MockMetrics struct {
// contains filtered or unexported fields
}
MockMetrics is a mock of Metrics interface.
func NewMockMetrics ¶ added in v0.3.0
func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics
NewMockMetrics creates a new mock instance.
func (*MockMetrics) DeltaUpDownCounter ¶ added in v0.3.0
func (m *MockMetrics) DeltaUpDownCounter(ctx context.Context, name string, value float64, labels ...string)
DeltaUpDownCounter mocks base method.
func (*MockMetrics) EXPECT ¶ added in v0.3.0
func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMetrics) IncrementCounter ¶ added in v0.3.0
func (m *MockMetrics) IncrementCounter(ctx context.Context, name string, labels ...string)
IncrementCounter mocks base method.
func (*MockMetrics) RecordHistogram ¶ added in v0.3.0
func (m *MockMetrics) RecordHistogram(ctx context.Context, name string, value float64, labels ...string)
RecordHistogram mocks base method.
func (*MockMetrics) SetGauge ¶ added in v0.3.0
func (m *MockMetrics) SetGauge(name string, value float64)
SetGauge mocks base method.
type MockMetricsMockRecorder ¶ added in v0.3.0
type MockMetricsMockRecorder struct {
// contains filtered or unexported fields
}
MockMetricsMockRecorder is the mock recorder for MockMetrics.
func (*MockMetricsMockRecorder) DeltaUpDownCounter ¶ added in v0.3.0
func (mr *MockMetricsMockRecorder) DeltaUpDownCounter(ctx, name, value interface{}, labels ...interface{}) *gomock.Call
DeltaUpDownCounter indicates an expected call of DeltaUpDownCounter.
func (*MockMetricsMockRecorder) IncrementCounter ¶ added in v0.3.0
func (mr *MockMetricsMockRecorder) IncrementCounter(ctx, name interface{}, labels ...interface{}) *gomock.Call
IncrementCounter indicates an expected call of IncrementCounter.
func (*MockMetricsMockRecorder) RecordHistogram ¶ added in v0.3.0
func (mr *MockMetricsMockRecorder) RecordHistogram(ctx, name, value interface{}, labels ...interface{}) *gomock.Call
RecordHistogram indicates an expected call of RecordHistogram.
func (*MockMetricsMockRecorder) SetGauge ¶ added in v0.3.0
func (mr *MockMetricsMockRecorder) SetGauge(name, value interface{}) *gomock.Call
SetGauge indicates an expected call of SetGauge.
type QueryLog ¶
type QueryLog struct { Query string `json:"query"` Duration int64 `json:"duration"` Args interface{} `json:"args,omitempty"` }
QueryLog represents a logged Redis query.
type Redis ¶
type Redis struct { *redis.Client // contains filtered or unexported fields }
func NewClient ¶
NewClient return a redis client if connection is successful based on Config. In case of error, it returns an error as second parameter.
func (*Redis) HealthCheck ¶
func (r *Redis) HealthCheck() datasource.Health