io

package
v0.10.3-0...-f06509b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinlogIO

type BinlogIO interface {
	Download(ctx context.Context, paths []string) ([][]byte, error)
	Upload(ctx context.Context, kvs map[string][]byte) error
	// JoinFullPath returns the full path by join the paths with the chunkmanager's rootpath
	JoinFullPath(paths ...string) string
}

func NewBinlogIO

func NewBinlogIO(cm storage.ChunkManager, ioPool *conc.Pool[any]) BinlogIO

type BinlogIoImpl

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

func (*BinlogIoImpl) Download

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

func (*BinlogIoImpl) JoinFullPath

func (b *BinlogIoImpl) JoinFullPath(paths ...string) string

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) 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) JoinFullPath

func (_m *MockBinlogIO) JoinFullPath(paths ...string) string

JoinFullPath provides a mock function with given fields: paths

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_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) 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) JoinFullPath

func (_e *MockBinlogIO_Expecter) JoinFullPath(paths ...interface{}) *MockBinlogIO_JoinFullPath_Call

JoinFullPath is a helper method to define mock.On call

  • 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_JoinFullPath_Call

type MockBinlogIO_JoinFullPath_Call struct {
	*mock.Call
}

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

func (*MockBinlogIO_JoinFullPath_Call) Return

func (*MockBinlogIO_JoinFullPath_Call) Run

func (*MockBinlogIO_JoinFullPath_Call) RunAndReturn

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