importer

package
v1.1.54 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package importer is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportResp

type ImportResp struct {
	RecordNum int
	Latency   time.Duration
	RespTime  time.Duration
}

type ImportResult

type ImportResult struct {
	Resp *ImportResp
	Err  error
}

type Importer

type Importer interface {
	Import(records ...spec.Record) (*ImportResp, error)

	// Add Done Wait for synchronize, similar to sync.WaitGroup.
	Add(delta int)
	Done()
	Wait()
}

func New

func New(builder spec.StatementBuilder, pool client.Pool, opts ...Option) Importer

func NewWithOpts

func NewWithOpts(opts ...Option) Importer

type MockImporter

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

MockImporter is a mock of Importer interface.

func NewMockImporter

func NewMockImporter(ctrl *gomock.Controller) *MockImporter

NewMockImporter creates a new mock instance.

func (*MockImporter) Add

func (m *MockImporter) Add(delta int)

Add mocks base method.

func (*MockImporter) Done

func (m *MockImporter) Done()

Done mocks base method.

func (*MockImporter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockImporter) Import

func (m *MockImporter) Import(records ...spec.Record) (*ImportResp, error)

Import mocks base method.

func (*MockImporter) Wait

func (m *MockImporter) Wait()

Wait mocks base method.

type MockImporterMockRecorder

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

MockImporterMockRecorder is the mock recorder for MockImporter.

func (*MockImporterMockRecorder) Add

func (mr *MockImporterMockRecorder) Add(delta interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockImporterMockRecorder) Done

func (mr *MockImporterMockRecorder) Done() *gomock.Call

Done indicates an expected call of Done.

func (*MockImporterMockRecorder) Import

func (mr *MockImporterMockRecorder) Import(records ...interface{}) *gomock.Call

Import indicates an expected call of Import.

func (*MockImporterMockRecorder) Wait

func (mr *MockImporterMockRecorder) Wait() *gomock.Call

Wait indicates an expected call of Wait.

type Option

type Option func(*defaultImporter)

func WithAddFunc

func WithAddFunc(fn func(delta int)) Option

func WithClientPool

func WithClientPool(p client.Pool) Option

func WithDoneFunc

func WithDoneFunc(fn func()) Option

func WithStatementBuilder

func WithStatementBuilder(builder spec.StatementBuilder) Option

func WithWaitFunc

func WithWaitFunc(fn func()) Option

Jump to

Keyboard shortcuts

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