client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("databricks: not implemented")
View Source
var RecordResults bool

this is used to generate test data. Developer should change this manually

Functions

func CheckStatus

func CheckStatus(resp interface{}) error

func SprintGuid

func SprintGuid(bts []byte) string

Types

type TestClient

type TestClient struct {
	FnOpenSession           func(ctx context.Context, req *cli_service.TOpenSessionReq) (_r *cli_service.TOpenSessionResp, _err error)
	FnCloseSession          func(ctx context.Context, req *cli_service.TCloseSessionReq) (_r *cli_service.TCloseSessionResp, _err error)
	FnGetInfo               func(ctx context.Context, req *cli_service.TGetInfoReq) (_r *cli_service.TGetInfoResp, _err error)
	FnExecuteStatement      func(ctx context.Context, req *cli_service.TExecuteStatementReq) (_r *cli_service.TExecuteStatementResp, _err error)
	FnGetTypeInfo           func(ctx context.Context, req *cli_service.TGetTypeInfoReq) (_r *cli_service.TGetTypeInfoResp, _err error)
	FnGetCatalogs           func(ctx context.Context, req *cli_service.TGetCatalogsReq) (_r *cli_service.TGetCatalogsResp, _err error)
	FnGetSchemas            func(ctx context.Context, req *cli_service.TGetSchemasReq) (_r *cli_service.TGetSchemasResp, _err error)
	FnGetTables             func(ctx context.Context, req *cli_service.TGetTablesReq) (_r *cli_service.TGetTablesResp, _err error)
	FnGetTableTypes         func(ctx context.Context, req *cli_service.TGetTableTypesReq) (_r *cli_service.TGetTableTypesResp, _err error)
	FnGetColumns            func(ctx context.Context, req *cli_service.TGetColumnsReq) (_r *cli_service.TGetColumnsResp, _err error)
	FnGetFunctions          func(ctx context.Context, req *cli_service.TGetFunctionsReq) (_r *cli_service.TGetFunctionsResp, _err error)
	FnGetPrimaryKeys        func(ctx context.Context, req *cli_service.TGetPrimaryKeysReq) (_r *cli_service.TGetPrimaryKeysResp, _err error)
	FnGetCrossReference     func(ctx context.Context, req *cli_service.TGetCrossReferenceReq) (_r *cli_service.TGetCrossReferenceResp, _err error)
	FnGetOperationStatus    func(ctx context.Context, req *cli_service.TGetOperationStatusReq) (_r *cli_service.TGetOperationStatusResp, _err error)
	FnCancelOperation       func(ctx context.Context, req *cli_service.TCancelOperationReq) (_r *cli_service.TCancelOperationResp, _err error)
	FnCloseOperation        func(ctx context.Context, req *cli_service.TCloseOperationReq) (_r *cli_service.TCloseOperationResp, _err error)
	FnGetResultSetMetadata  func(ctx context.Context, req *cli_service.TGetResultSetMetadataReq) (_r *cli_service.TGetResultSetMetadataResp, _err error)
	FnFetchResults          func(ctx context.Context, req *cli_service.TFetchResultsReq) (_r *cli_service.TFetchResultsResp, _err error)
	FnGetDelegationToken    func(ctx context.Context, req *cli_service.TGetDelegationTokenReq) (_r *cli_service.TGetDelegationTokenResp, _err error)
	FnCancelDelegationToken func(ctx context.Context, req *cli_service.TCancelDelegationTokenReq) (_r *cli_service.TCancelDelegationTokenResp, _err error)
	FnRenewDelegationToken  func(ctx context.Context, req *cli_service.TRenewDelegationTokenReq) (_r *cli_service.TRenewDelegationTokenResp, _err error)
}

func (*TestClient) CancelDelegationToken

func (*TestClient) CancelOperation

func (*TestClient) CloseOperation

func (*TestClient) CloseSession

func (*TestClient) ExecuteStatement

func (*TestClient) FetchResults

func (*TestClient) GetCatalogs

func (*TestClient) GetColumns

func (*TestClient) GetCrossReference

func (*TestClient) GetDelegationToken

func (*TestClient) GetFunctions

func (*TestClient) GetInfo

func (c *TestClient) GetInfo(ctx context.Context, req *cli_service.TGetInfoReq) (_r *cli_service.TGetInfoResp, _err error)

func (*TestClient) GetOperationStatus

func (*TestClient) GetPrimaryKeys

func (*TestClient) GetResultSetMetadata

func (*TestClient) GetSchemas

func (*TestClient) GetTableTypes

func (*TestClient) GetTables

func (c *TestClient) GetTables(ctx context.Context, req *cli_service.TGetTablesReq) (_r *cli_service.TGetTablesResp, _err error)

func (*TestClient) GetTypeInfo

func (*TestClient) OpenSession

func (*TestClient) RenewDelegationToken

type ThriftResponse

type ThriftResponse interface {
	GetStatus() *cli_service.TStatus
}

ThriftResponse respresents thrift rpc response

type ThriftServiceClient

type ThriftServiceClient struct {
	*cli_service.TCLIServiceClient
	// contains filtered or unexported fields
}

func InitThriftClient

func InitThriftClient(cfg *config.Config) (*ThriftServiceClient, error)

func (*ThriftServiceClient) CancelOperation

func (*ThriftServiceClient) CloseOperation

func (*ThriftServiceClient) CloseSession

func (*ThriftServiceClient) ExecuteStatement

func (*ThriftServiceClient) FetchResults

func (*ThriftServiceClient) GetOperationStatus

func (*ThriftServiceClient) OpenSession

type Transport

type Transport struct {
	*http.Transport
	// contains filtered or unexported fields
}

This is a wrapper of the http transport so we can have access to response code and headers It is important to know the code and headers to know if we need to retry or not

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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