client

package
v0.0.0-...-f9144f1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConnector

type ClientConnector interface {
	Open(ctx context.Context, dsn string) (*ydb.Driver, error)
	Close(ctx context.Context, clientDb *ydb.Driver) error

	PreparePathsForExport(ctx context.Context, clientDb *ydb.Driver, sourcePaths []string, sourcePathsToExclude []string) ([]string, error)
	ExportToS3(ctx context.Context, clientDb *ydb.Driver, s3Settings types.ExportSettings) (string, error)
	ImportFromS3(ctx context.Context, clientDb *ydb.Driver, s3Settings types.ImportSettings) (string, error)
	GetOperationStatus(
		ctx context.Context, clientDb *ydb.Driver, operationId string,
	) (*Ydb_Operations.GetOperationResponse, error)
	ForgetOperation(
		ctx context.Context, clientDb *ydb.Driver, operationId string,
	) (*Ydb_Operations.ForgetOperationResponse, error)
	CancelOperation(
		ctx context.Context, clientDb *ydb.Driver, operationId string,
	) (*Ydb_Operations.CancelOperationResponse, error)
	ListExportOperations(
		ctx context.Context, clientDb *ydb.Driver,
	) (*Ydb_Operations.ListOperationsResponse, error)
}

type ClientYdbConnector

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

func NewClientYdbConnector

func NewClientYdbConnector(config config.ClientConnectionConfig) *ClientYdbConnector

func (*ClientYdbConnector) CancelOperation

func (d *ClientYdbConnector) CancelOperation(
	ctx context.Context, clientDb *ydb.Driver, operationId string,
) (*Ydb_Operations.CancelOperationResponse, error)

func (*ClientYdbConnector) Close

func (d *ClientYdbConnector) Close(ctx context.Context, clientDb *ydb.Driver) error

func (*ClientYdbConnector) ExportToS3

func (d *ClientYdbConnector) ExportToS3(
	ctx context.Context, clientDb *ydb.Driver, s3Settings types.ExportSettings,
) (string, error)

func (*ClientYdbConnector) ForgetOperation

func (d *ClientYdbConnector) ForgetOperation(
	ctx context.Context, clientDb *ydb.Driver, operationId string,
) (*Ydb_Operations.ForgetOperationResponse, error)

func (*ClientYdbConnector) GetOperationStatus

func (d *ClientYdbConnector) GetOperationStatus(
	ctx context.Context, clientDb *ydb.Driver, operationId string,
) (*Ydb_Operations.GetOperationResponse, error)

func (*ClientYdbConnector) ImportFromS3

func (d *ClientYdbConnector) ImportFromS3(ctx context.Context, clientDb *ydb.Driver, s3Settings types.ImportSettings) (string, error)

func (*ClientYdbConnector) ListExportOperations

func (d *ClientYdbConnector) ListExportOperations(
	ctx context.Context, clientDb *ydb.Driver) (*Ydb_Operations.ListOperationsResponse, error)

func (*ClientYdbConnector) Open

func (d *ClientYdbConnector) Open(ctx context.Context, dsn string) (*ydb.Driver, error)

func (*ClientYdbConnector) PreparePathsForExport

func (d *ClientYdbConnector) PreparePathsForExport(
	ctx context.Context, clientDb *ydb.Driver, sourcePaths []string, sourcePathsToExclude []string,
) ([]string, error)

type MockClientConnector

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

func NewMockClientConnector

func NewMockClientConnector(options ...Option) *MockClientConnector

func (*MockClientConnector) CancelOperation

func (m *MockClientConnector) CancelOperation(_ context.Context, _ *ydb.Driver, operationId string) (*Ydb_Operations.CancelOperationResponse, error)

func (*MockClientConnector) Close

func (m *MockClientConnector) Close(_ context.Context, _ *ydb.Driver) error

func (*MockClientConnector) ExportToS3

func (m *MockClientConnector) ExportToS3(_ context.Context, _ *ydb.Driver, s3Settings types.ExportSettings) (string, error)

func (*MockClientConnector) ForgetOperation

func (m *MockClientConnector) ForgetOperation(_ context.Context, _ *ydb.Driver, operationId string) (*Ydb_Operations.ForgetOperationResponse, error)

func (*MockClientConnector) GetOperationStatus

func (m *MockClientConnector) GetOperationStatus(_ context.Context, _ *ydb.Driver, operationId string) (*Ydb_Operations.GetOperationResponse, error)

func (*MockClientConnector) ImportFromS3

func (m *MockClientConnector) ImportFromS3(_ context.Context, _ *ydb.Driver, s3Settings types.ImportSettings) (string, error)

func (*MockClientConnector) ListExportOperations

func (m *MockClientConnector) ListExportOperations(_ context.Context, _ *ydb.Driver) (*Ydb_Operations.ListOperationsResponse, error)

func (*MockClientConnector) Open

func (m *MockClientConnector) Open(_ context.Context, _ string) (*ydb.Driver, error)

func (*MockClientConnector) PreparePathsForExport

func (m *MockClientConnector) PreparePathsForExport(
	_ context.Context, _ *ydb.Driver, sourcePaths []string, _ []string,
) ([]string, error)

type ObjectPath

type ObjectPath struct {
	Bucket    string
	KeyPrefix string
}

type Option

type Option func(*MockClientConnector)

func WithOperations

func WithOperations(operations map[string]*Ydb_Operations.Operation) Option

Jump to

Keyboard shortcuts

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