snowflake

package
v1.2.3-fred.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTestClient

func MakeTestClient(_ context.Context, config common.TestClientConfig, opts ...ClientOptions) (*sql.DB, error)

MakeTestClient returns Redis client connection according to the provided parameters.

Types

type ClientOptions

type ClientOptions func(*ClientOptionsParams)

ClientOptions allows setting test client options.

type ClientOptionsParams

type ClientOptionsParams struct {
}

ClientOptionsParams is a struct for client configuration options.

type Engine

type Engine struct {
	// EngineConfig is the common database engine configuration.
	common.EngineConfig

	// HTTPClient is the client being used to talk to Snowflake API.
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func (*Engine) HandleConnection

func (e *Engine) HandleConnection(ctx context.Context, sessionCtx *common.Session) error

func (*Engine) InitializeConnection

func (e *Engine) InitializeConnection(clientConn net.Conn, sessionCtx *common.Session) error

func (*Engine) SendError

func (e *Engine) SendError(err error)

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) Close

func (s *TestServer) Close() error

Close starts serving client connections.

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.

func TestForceTokenRefresh

func TestForceTokenRefresh() TestServerOption

TestForceTokenRefresh makes the test server return sessionExpiredCode error on the first query request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL