Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOptions ¶
type ClientOptions func(*ClientOptionsParams)
ClientOptions allows setting test client options.
func WithCassandraUsername ¶
func WithCassandraUsername(username string) ClientOptions
WithCassandraUsername set the username used during cassandra login.
type ClientOptionsParams ¶
type ClientOptionsParams struct {
Username string
}
ClientOptionsParams is a struct for client configuration options.
type Engine ¶
type Engine struct { // EngineConfig is the common database engine configuration. common.EngineConfig // contains filtered or unexported fields }
Engine implements common.Engine.
func (*Engine) HandleConnection ¶
HandleConnection processes the connection from Cassandra proxy coming over reverse tunnel.
func (*Engine) InitializeConnection ¶
InitializeConnection initializes the database connection.
func (*Engine) SendError ¶
SendError send a Cassandra ServerError to error to the client if handshake was not yet initialized by the client. Cassandra wire protocol relies on streamID to that are set by the client and server response needs to set the correct streamID in order to get streamID SendError reads a first message send by the client.
type Session ¶
Session alias for easier use.
func MakeTestClient ¶
func MakeTestClient(_ context.Context, config common.TestClientConfig, opts ...ClientOptions) (*Session, error)
MakeTestClient returns Cassandra client connection according to the provided parameters.
type TestServer ¶
type TestServer struct {
// contains filtered or unexported fields
}
func NewTestServer ¶
func NewTestServer(config common.TestServerConfig, opts ...TestServerOption) (*TestServer, error)
NewTestServer returns a new instance of a test Snowflake server.
func (*TestServer) Port ¶
func (s *TestServer) Port() string
func (*TestServer) Serve ¶
func (s *TestServer) Serve() error
Serve starts serving client connections.
type TestServerOption ¶
type TestServerOption func(*TestServer)
TestServerOption allows setting test server options.