io

package
v0.10.3-0...-304cdc7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBFApplyPool

func GetBFApplyPool() *conc.Pool[any]

func GetOrCreateIOPool

func GetOrCreateIOPool() *conc.Pool[any]

func GetOrCreateStatsPool

func GetOrCreateStatsPool() *conc.Pool[any]

func ResizeBFApplyPool

func ResizeBFApplyPool(evt *config.Event)

Types

type BinlogIO

type BinlogIO interface {
	Download(ctx context.Context, paths []string) ([][]byte, error)
	AsyncDownload(ctx context.Context, paths []string) []*conc.Future[any]
	Upload(ctx context.Context, kvs map[string][]byte) error
	AsyncUpload(ctx context.Context, kvs map[string][]byte) []*conc.Future[any]
}

func NewBinlogIO

func NewBinlogIO(cm storage.ChunkManager) BinlogIO

type BinlogIoImpl

type BinlogIoImpl struct {
	storage.ChunkManager
	// contains filtered or unexported fields
}

func (*BinlogIoImpl) AsyncDownload

func (b *BinlogIoImpl) AsyncDownload(ctx context.Context, paths []string) []*conc.Future[any]

func (*BinlogIoImpl) AsyncUpload

func (b *BinlogIoImpl) AsyncUpload(ctx context.Context, kvs map[string][]byte) []*conc.Future[any]

func (*BinlogIoImpl) Download

func (b *BinlogIoImpl) Download(ctx context.Context, paths []string) ([][]byte, error)

func (*BinlogIoImpl) Upload

func (b *BinlogIoImpl) Upload(ctx context.Context, kvs map[string][]byte) error

type MockBinlogIO

type MockBinlogIO struct {
	mock.Mock
}

MockBinlogIO is an autogenerated mock type for the BinlogIO type

func NewMockBinlogIO

func NewMockBinlogIO(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBinlogIO

NewMockBinlogIO creates a new instance of MockBinlogIO. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBinlogIO) AsyncDownload

func (_m *MockBinlogIO) AsyncDownload(ctx context.Context, paths []string) []*conc.Future[interface{}]

AsyncDownload provides a mock function with given fields: ctx, paths

func (*MockBinlogIO) AsyncUpload

func (_m *MockBinlogIO) AsyncUpload(ctx context.Context, kvs map[string][]byte) []*conc.Future[interface{}]

AsyncUpload provides a mock function with given fields: ctx, kvs

func (*MockBinlogIO) Download

func (_m *MockBinlogIO) Download(ctx context.Context, paths []string) ([][]byte, error)

Download provides a mock function with given fields: ctx, paths

func (*MockBinlogIO) EXPECT

func (_m *MockBinlogIO) EXPECT() *MockBinlogIO_Expecter

func (*MockBinlogIO) Upload

func (_m *MockBinlogIO) Upload(ctx context.Context, kvs map[string][]byte) error

Upload provides a mock function with given fields: ctx, kvs

type MockBinlogIO_AsyncDownload_Call

type MockBinlogIO_AsyncDownload_Call struct {
	*mock.Call
}

MockBinlogIO_AsyncDownload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AsyncDownload'

func (*MockBinlogIO_AsyncDownload_Call) Return

func (*MockBinlogIO_AsyncDownload_Call) Run

func (*MockBinlogIO_AsyncDownload_Call) RunAndReturn

func (_c *MockBinlogIO_AsyncDownload_Call) RunAndReturn(run func(context.Context, []string) []*conc.Future[interface{}]) *MockBinlogIO_AsyncDownload_Call

type MockBinlogIO_AsyncUpload_Call

type MockBinlogIO_AsyncUpload_Call struct {
	*mock.Call
}

MockBinlogIO_AsyncUpload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AsyncUpload'

func (*MockBinlogIO_AsyncUpload_Call) Return

func (*MockBinlogIO_AsyncUpload_Call) Run

func (*MockBinlogIO_AsyncUpload_Call) RunAndReturn

func (_c *MockBinlogIO_AsyncUpload_Call) RunAndReturn(run func(context.Context, map[string][]byte) []*conc.Future[interface{}]) *MockBinlogIO_AsyncUpload_Call

type MockBinlogIO_Download_Call

type MockBinlogIO_Download_Call struct {
	*mock.Call
}

MockBinlogIO_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'

func (*MockBinlogIO_Download_Call) Return

func (*MockBinlogIO_Download_Call) Run

func (*MockBinlogIO_Download_Call) RunAndReturn

func (_c *MockBinlogIO_Download_Call) RunAndReturn(run func(context.Context, []string) ([][]byte, error)) *MockBinlogIO_Download_Call

type MockBinlogIO_Expecter

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

func (*MockBinlogIO_Expecter) AsyncDownload

func (_e *MockBinlogIO_Expecter) AsyncDownload(ctx interface{}, paths interface{}) *MockBinlogIO_AsyncDownload_Call

AsyncDownload is a helper method to define mock.On call

  • ctx context.Context
  • paths []string

func (*MockBinlogIO_Expecter) AsyncUpload

func (_e *MockBinlogIO_Expecter) AsyncUpload(ctx interface{}, kvs interface{}) *MockBinlogIO_AsyncUpload_Call

AsyncUpload is a helper method to define mock.On call

  • ctx context.Context
  • kvs map[string][]byte

func (*MockBinlogIO_Expecter) Download

func (_e *MockBinlogIO_Expecter) Download(ctx interface{}, paths interface{}) *MockBinlogIO_Download_Call

Download is a helper method to define mock.On call

  • ctx context.Context
  • paths []string

func (*MockBinlogIO_Expecter) Upload

func (_e *MockBinlogIO_Expecter) Upload(ctx interface{}, kvs interface{}) *MockBinlogIO_Upload_Call

Upload is a helper method to define mock.On call

  • ctx context.Context
  • kvs map[string][]byte

type MockBinlogIO_Upload_Call

type MockBinlogIO_Upload_Call struct {
	*mock.Call
}

MockBinlogIO_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload'

func (*MockBinlogIO_Upload_Call) Return

func (*MockBinlogIO_Upload_Call) Run

func (_c *MockBinlogIO_Upload_Call) Run(run func(ctx context.Context, kvs map[string][]byte)) *MockBinlogIO_Upload_Call

func (*MockBinlogIO_Upload_Call) RunAndReturn

Jump to

Keyboard shortcuts

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