Documentation ¶
Overview ¶
Package datasource describes the interface that must be satisfied by any external data source accessible through the connector.
Index ¶
- type DataSource
- type DataSourceFactory
- type DataSourceMock
- func (m *DataSourceMock[T]) DescribeTable(ctx context.Context, logger log.Logger, ...) (*api_service_protos.TDescribeTableResponse, error)
- func (m *DataSourceMock[T]) ReadSplit(ctx context.Context, logger log.Logger, split *api_service_protos.TSplit, ...)
- func (m *DataSourceMock[T]) TypeMapper() utils.TypeMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource[T utils.Acceptor] interface { // DescribeTable returns metadata about a table (or similair entity in non-relational data sources) // located within a particular database in a data source cluster. DescribeTable( ctx context.Context, logger log.Logger, request *api_service_protos.TDescribeTableRequest, ) (*api_service_protos.TDescribeTableResponse, error) // ReadSplit is a main method for reading data from the table. ReadSplit( ctx context.Context, logger log.Logger, split *api_service_protos.TSplit, sink paging.Sink[T], ) }
DataSource is an abstraction over external data storage that is available for data and metadata extraction. All new data sources must implement this interface. The types of data extracted from the data source are parametrized via [T utils.Acceptor] interface.
type DataSourceFactory ¶
type DataSourceFactory[T utils.Acceptor] interface { Make( logger log.Logger, dataSourceType api_common.EDataSourceKind, ) (DataSource[T], error) }
type DataSourceMock ¶
func (*DataSourceMock[T]) DescribeTable ¶
func (m *DataSourceMock[T]) DescribeTable( ctx context.Context, logger log.Logger, request *api_service_protos.TDescribeTableRequest, ) (*api_service_protos.TDescribeTableResponse, error)
func (*DataSourceMock[T]) ReadSplit ¶
func (m *DataSourceMock[T]) ReadSplit( ctx context.Context, logger log.Logger, split *api_service_protos.TSplit, pagingWriter paging.Sink[T], )
func (*DataSourceMock[T]) TypeMapper ¶
func (m *DataSourceMock[T]) TypeMapper() utils.TypeMapper
Directories ¶
Path | Synopsis |
---|---|
Package rdbms contains generalized abstractions suitable for use with any relational database.
|
Package rdbms contains generalized abstractions suitable for use with any relational database. |
clickhouse
Package clickhouse contains code specific for ClickHouse database.
|
Package clickhouse contains code specific for ClickHouse database. |
postgresql
Package postgresql contains code specific for PostgreSQL database.
|
Package postgresql contains code specific for PostgreSQL database. |
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. |
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 |
Click to show internal directories.
Click to hide internal directories.