mock

package
v1.13.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 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 swarm.Address) (ch swarm.Chunk, err error)

func (*MockStorer) GetModePut added in v0.2.0

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

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

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

func (*MockStorer) ReserveSample added in v1.9.0

func (m *MockStorer) ReserveSample(_ context.Context, _ []byte, _ uint8, _ uint64) (storage.Sample, 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) SubscribePullCalls added in v0.6.0

func (m *MockStorer) SubscribePullCalls() int

func (*MockStorer) SubscribePush

func (m *MockStorer) SubscribePush(ctx context.Context, skipf func([]byte) bool) (c <-chan swarm.Chunk, repeat, stop func())

type Option

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

func WithBaseAddress added in v0.2.0

func WithBaseAddress(a swarm.Address) Option

func WithPartialInterval

func WithPartialInterval(v bool) Option

func WithSubscribePullChunks

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

Jump to

Keyboard shortcuts

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