server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package server contains the code base of Connector GRPC service - the component of YDB's Federated Query system providing the unified interface to the external data sources.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "server",
	Short: "Connector server",
	Run: func(cmd *cobra.Command, args []string) {
		if err := runFromCLI(cmd, args); err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}

Functions

func NewDefaultConfig added in v0.1.1

func NewDefaultConfig() *config.TServerConfig

func NewHTTPPullerHandler

func NewHTTPPullerHandler(logger *zap.Logger, r MetricsStreamer, opts ...Option) http.Handler

NewHTTPPullerHandler returns new HTTP handler to expose gathered metrics using metrics dumper

func StartLauncherAndWaitForSignalOrError added in v0.1.1

func StartLauncherAndWaitForSignalOrError(logger *zap.Logger, l *Launcher)

func StreamServerMetrics

func StreamServerMetrics(registry metrics.Registry) grpc.StreamServerInterceptor

func UnaryServerMetrics

func UnaryServerMetrics(registry metrics.Registry) grpc.UnaryServerInterceptor

func ValidateDescribeTableRequest

func ValidateDescribeTableRequest(logger *zap.Logger, request *api_service_protos.TDescribeTableRequest) error

func ValidateListSplitsRequest

func ValidateListSplitsRequest(logger *zap.Logger, request *api_service_protos.TListSplitsRequest) error

func ValidateReadSplitsRequest

func ValidateReadSplitsRequest(logger *zap.Logger, request *api_service_protos.TReadSplitsRequest) error

Types

type DataSourceCollection

type DataSourceCollection struct {
	// contains filtered or unexported fields
}

func NewDataSourceCollection

func NewDataSourceCollection(
	queryLoggerFactory common.QueryLoggerFactory,
	memoryAllocator memory.Allocator,
	readLimiterFactory *paging.ReadLimiterFactory,
	cfg *config.TServerConfig,
) *DataSourceCollection

func (*DataSourceCollection) DescribeTable

func (*DataSourceCollection) DoReadSplit

type Launcher added in v0.1.1

type Launcher struct {
	// contains filtered or unexported fields
}

func NewLauncher added in v0.1.1

func NewLauncher(logger *zap.Logger, cfg *config.TServerConfig) (*Launcher, error)

func (*Launcher) Start added in v0.1.1

func (l *Launcher) Start() <-chan error

func (*Launcher) Stop added in v0.1.1

func (l *Launcher) Stop()

type MetricsStreamer

type MetricsStreamer interface {
	StreamJSON(context.Context, io.Writer) (int, error)
	StreamSpack(context.Context, io.Writer, solomon.CompressionType) (int, error)
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithSpack

func WithSpack() Option

Directories

Path Synopsis
Package datasource describes the interface that must be satisfied by any external data source accessible through the connector.
Package datasource describes the interface that must be satisfied by any external data source accessible through the connector.
rdbms
Package rdbms contains generalized abstractions suitable for use with any relational database.
Package rdbms contains generalized abstractions suitable for use with any relational database.
rdbms/clickhouse
Package clickhouse contains code specific for ClickHouse database.
Package clickhouse contains code specific for ClickHouse database.
rdbms/postgresql
Package postgresql contains code specific for PostgreSQL database.
Package postgresql contains code specific for PostgreSQL database.
rdbms/utils
Package utils contains helper types and functions that can be used by any relational data source.
Package utils contains helper types and functions that can be used by any relational data source.
rdbms/ydb
Package ydb contains code specific for YDB database.
Package ydb contains code specific for YDB database.
s3
Package s3 contains the implementation of S3 (Simple Storage Service) based data source
Package s3 contains the implementation of S3 (Simple Storage Service) based data source
Package paging contains logic of splitting incoming data stream into the separate pages or blocks.
Package paging contains logic of splitting incoming data stream into the separate pages or blocks.
Package streaming contains the logic of converting the data stream coming from the data source into the data stream sent over the network to the client.
Package streaming contains the logic of converting the data stream coming from the data source into the data stream sent over the network to the client.
Package utils contains various helpers and utility functions
Package utils contains various helpers and utility functions

Jump to

Keyboard shortcuts

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