Documentation ¶
Overview ¶
Package cassandra is a generated GoMock package.
Package cassandra is a generated GoMock package.
Package cassandra is a generated GoMock package.
Index ¶
- Constants
- type Client
- func (c *Client) BatchQuery(name, stmt string, values ...any) error
- func (c *Client) Connect()
- func (c *Client) Exec(stmt string, values ...any) error
- func (c *Client) ExecCAS(dest any, stmt string, values ...any) (bool, error)
- func (c *Client) ExecuteBatch(name string) error
- func (c *Client) ExecuteBatchCAS(name string, dest ...any) (bool, error)
- func (c *Client) HealthCheck(context.Context) (any, error)
- func (c *Client) NewBatch(name string, batchType int) error
- func (c *Client) Query(dest any, stmt string, values ...any) error
- func (c *Client) UseLogger(logger interface{})
- func (c *Client) UseMetrics(metrics interface{})
- type Config
- type Health
- type Logger
- type Metrics
- type MockLogger
- func (m *MockLogger) Debug(args ...any)
- func (m *MockLogger) Debugf(pattern string, args ...any)
- func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
- func (m *MockLogger) Error(args ...any)
- func (m *MockLogger) Errorf(patter string, args ...any)
- func (m *MockLogger) Log(args ...any)
- func (m *MockLogger) Logf(pattern string, args ...any)
- type MockLoggerMockRecorder
- func (mr *MockLoggerMockRecorder) Debug(args ...any) *gomock.Call
- func (mr *MockLoggerMockRecorder) Debugf(pattern any, args ...any) *gomock.Call
- func (mr *MockLoggerMockRecorder) Error(args ...any) *gomock.Call
- func (mr *MockLoggerMockRecorder) Errorf(patter any, args ...any) *gomock.Call
- func (mr *MockLoggerMockRecorder) Log(args ...any) *gomock.Call
- func (mr *MockLoggerMockRecorder) Logf(pattern any, args ...any) *gomock.Call
- type MockMetrics
- type MockMetricsMockRecorder
- type Mockbatch
- type MockbatchMockRecorder
- type MockclusterConfig
- type MockclusterConfigMockRecorder
- type Mockiterator
- type MockiteratorMockRecorder
- type Mockquery
- type MockqueryMockRecorder
- type Mocksession
- type MocksessionMockRecorder
- type QueryLog
Constants ¶
const ( LoggedBatch = iota UnloggedBatch CounterBatch )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New initializes Cassandra driver with the provided configuration. The Connect method must be called to establish a connection to Cassandra. Usage:
client := New(config) client.UseLogger(loggerInstance) client.UseMetrics(metricsInstance) client.Connect()
func (*Client) Connect ¶
func (c *Client) Connect()
Connect establishes a connection to Cassandra and registers metrics using the provided configuration when the client was Created.
func (*Client) ExecuteBatch ¶
func (*Client) ExecuteBatchCAS ¶
func (*Client) HealthCheck ¶
HealthCheck checks the health of the Cassandra.
func (*Client) UseLogger ¶
func (c *Client) UseLogger(logger interface{})
UseLogger sets the logger for the Cassandra client which asserts the Logger interface.
func (*Client) UseMetrics ¶
func (c *Client) UseMetrics(metrics interface{})
UseMetrics sets the metrics for the Cassandra client which asserts the Metrics interface.
type MockLogger ¶
type MockLogger struct {
// contains filtered or unexported fields
}
MockLogger is a mock of Logger interface.
func NewMockLogger ¶
func NewMockLogger(ctrl *gomock.Controller) *MockLogger
NewMockLogger creates a new mock instance.
func (*MockLogger) Debugf ¶
func (m *MockLogger) Debugf(pattern string, args ...any)
Debugf mocks base method.
func (*MockLogger) EXPECT ¶
func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLogger) Errorf ¶
func (m *MockLogger) Errorf(patter string, args ...any)
Errorf mocks base method.
func (*MockLogger) Logf ¶
func (m *MockLogger) Logf(pattern string, args ...any)
Logf mocks base method.
type MockLoggerMockRecorder ¶
type MockLoggerMockRecorder struct {
// contains filtered or unexported fields
}
MockLoggerMockRecorder is the mock recorder for MockLogger.
func (*MockLoggerMockRecorder) Debug ¶
func (mr *MockLoggerMockRecorder) Debug(args ...any) *gomock.Call
Debug indicates an expected call of Debug.
func (*MockLoggerMockRecorder) Debugf ¶
func (mr *MockLoggerMockRecorder) Debugf(pattern any, args ...any) *gomock.Call
Debugf indicates an expected call of Debugf.
func (*MockLoggerMockRecorder) Error ¶
func (mr *MockLoggerMockRecorder) Error(args ...any) *gomock.Call
Error indicates an expected call of Error.
func (*MockLoggerMockRecorder) Errorf ¶
func (mr *MockLoggerMockRecorder) Errorf(patter any, args ...any) *gomock.Call
Errorf indicates an expected call of Errorf.
type MockMetrics ¶
type MockMetrics struct {
// contains filtered or unexported fields
}
MockMetrics is a mock of Metrics interface.
func NewMockMetrics ¶
func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics
NewMockMetrics creates a new mock instance.
func (*MockMetrics) EXPECT ¶
func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMetrics) NewHistogram ¶
func (m *MockMetrics) NewHistogram(name, desc string, buckets ...float64)
NewHistogram mocks base method.
func (*MockMetrics) RecordHistogram ¶
func (m *MockMetrics) RecordHistogram(ctx context.Context, name string, value float64, labels ...string)
RecordHistogram mocks base method.
type MockMetricsMockRecorder ¶
type MockMetricsMockRecorder struct {
// contains filtered or unexported fields
}
MockMetricsMockRecorder is the mock recorder for MockMetrics.
func (*MockMetricsMockRecorder) NewHistogram ¶
func (mr *MockMetricsMockRecorder) NewHistogram(name, desc any, buckets ...any) *gomock.Call
NewHistogram indicates an expected call of NewHistogram.
func (*MockMetricsMockRecorder) RecordHistogram ¶
func (mr *MockMetricsMockRecorder) RecordHistogram(ctx, name, value any, labels ...any) *gomock.Call
RecordHistogram indicates an expected call of RecordHistogram.
type Mockbatch ¶
type Mockbatch struct {
// contains filtered or unexported fields
}
Mockbatch is a mock of batch interface.
func NewMockbatch ¶
func NewMockbatch(ctrl *gomock.Controller) *Mockbatch
NewMockbatch creates a new mock instance.
func (*Mockbatch) EXPECT ¶
func (m *Mockbatch) EXPECT() *MockbatchMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockbatchMockRecorder ¶
type MockbatchMockRecorder struct {
// contains filtered or unexported fields
}
MockbatchMockRecorder is the mock recorder for Mockbatch.
type MockclusterConfig ¶
type MockclusterConfig struct {
// contains filtered or unexported fields
}
MockclusterConfig is a mock of clusterConfig interface.
func NewMockclusterConfig ¶
func NewMockclusterConfig(ctrl *gomock.Controller) *MockclusterConfig
NewMockclusterConfig creates a new mock instance.
func (*MockclusterConfig) EXPECT ¶
func (m *MockclusterConfig) EXPECT() *MockclusterConfigMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockclusterConfigMockRecorder ¶
type MockclusterConfigMockRecorder struct {
// contains filtered or unexported fields
}
MockclusterConfigMockRecorder is the mock recorder for MockclusterConfig.
type Mockiterator ¶
type Mockiterator struct {
// contains filtered or unexported fields
}
Mockiterator is a mock of iterator interface.
func NewMockiterator ¶
func NewMockiterator(ctrl *gomock.Controller) *Mockiterator
NewMockiterator creates a new mock instance.
func (*Mockiterator) EXPECT ¶
func (m *Mockiterator) EXPECT() *MockiteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockiteratorMockRecorder ¶
type MockiteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockiteratorMockRecorder is the mock recorder for Mockiterator.
type Mockquery ¶
type Mockquery struct {
// contains filtered or unexported fields
}
Mockquery is a mock of query interface.
func NewMockquery ¶
func NewMockquery(ctrl *gomock.Controller) *Mockquery
NewMockquery creates a new mock instance.
func (*Mockquery) EXPECT ¶
func (m *Mockquery) EXPECT() *MockqueryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockqueryMockRecorder ¶
type MockqueryMockRecorder struct {
// contains filtered or unexported fields
}
MockqueryMockRecorder is the mock recorder for Mockquery.
type Mocksession ¶
type Mocksession struct {
// contains filtered or unexported fields
}
Mocksession is a mock of session interface.
func NewMocksession ¶
func NewMocksession(ctrl *gomock.Controller) *Mocksession
NewMocksession creates a new mock instance.
func (*Mocksession) EXPECT ¶
func (m *Mocksession) EXPECT() *MocksessionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocksessionMockRecorder ¶
type MocksessionMockRecorder struct {
// contains filtered or unexported fields
}
MocksessionMockRecorder is the mock recorder for Mocksession.