mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 NewValidatingStorer

func NewValidatingStorer(v swarm.ChunkValidator, tags *tags.Tags) *MockStorer

func (*MockStorer) Close

func (m *MockStorer) Close() error

func (*MockStorer) Get

func (m *MockStorer) Get(ctx context.Context, mode storage.ModeGet, addr swarm.Address) (ch swarm.Chunk, err error)

func (*MockStorer) GetModeSet

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

func (*MockStorer) GetMulti

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

func (*MockStorer) Has

func (m *MockStorer) Has(ctx context.Context, addr swarm.Address) (yes bool, err error)

func (*MockStorer) HasMulti

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

func (*MockStorer) LastPullSubscriptionBinID

func (m *MockStorer) LastPullSubscriptionBinID(bin uint8) (id uint64, err error)

func (*MockStorer) MorePull

func (m *MockStorer) MorePull(d ...storage.Descriptor)

func (*MockStorer) PinInfo

func (m *MockStorer) PinInfo(address swarm.Address) (uint64, error)

func (*MockStorer) PinnedChunks

func (m *MockStorer) PinnedChunks(ctx context.Context, cursor swarm.Address) (pinnedChunks []*storage.Pinner, err error)

func (*MockStorer) Put

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

func (*MockStorer) Set

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

func (*MockStorer) SubscribePull

func (m *MockStorer) SubscribePull(ctx context.Context, bin uint8, since, until uint64) (<-chan storage.Descriptor, <-chan struct{}, func())

func (*MockStorer) SubscribePush

func (m *MockStorer) SubscribePush(ctx context.Context) (c <-chan swarm.Chunk, stop func())

type Option

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

func WithPartialInterval

func WithPartialInterval(v bool) Option

func WithSubscribePullChunks

func WithSubscribePullChunks(chs ...storage.Descriptor) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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