mock

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStorer

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

func NewStorer

func NewStorer(opts ...Option) *MockStorer

func (*MockStorer) Close

func (m *MockStorer) Close() error

func (*MockStorer) Get

func (m *MockStorer) Get(_ context.Context, _ storage.ModeGet, addr boson.Address) (ch boson.Chunk, err error)

func (*MockStorer) GetModePut

func (m *MockStorer) GetModePut(addr boson.Address) (mode storage.ModePut)

func (*MockStorer) GetModeSet

func (m *MockStorer) GetModeSet(addr boson.Address) (mode storage.ModeSet)

func (*MockStorer) GetMulti

func (m *MockStorer) GetMulti(ctx context.Context, mode storage.ModeGet, addrs ...boson.Address) (ch []boson.Chunk, err error)

func (*MockStorer) Has

func (m *MockStorer) Has(ctx context.Context, hasMode storage.ModeHas, addr boson.Address) (yes bool, err error)

func (*MockStorer) HasMulti

func (m *MockStorer) HasMulti(ctx context.Context, hasMode storage.ModeHas, addrs ...boson.Address) (yes []bool, err error)

func (*MockStorer) Put

func (m *MockStorer) Put(ctx context.Context, mode storage.ModePut, chs ...boson.Chunk) (exist []bool, err error)

func (*MockStorer) Set

func (m *MockStorer) Set(ctx context.Context, mode storage.ModeSet, addrs ...boson.Address) (err error)

type Option

type Option interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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