Documentation ¶
Index ¶
- type MockStorer
- func (m *MockStorer) Close() error
- func (m *MockStorer) Get(_ context.Context, _ storage.ModeGet, addr swarm.Address) (ch swarm.Chunk, err error)
- func (m *MockStorer) GetModePut(addr swarm.Address) (mode storage.ModePut)
- func (m *MockStorer) GetModeSet(addr swarm.Address) (mode storage.ModeSet)
- func (m *MockStorer) GetMulti(ctx context.Context, mode storage.ModeGet, addrs ...swarm.Address) (ch []swarm.Chunk, err error)
- func (m *MockStorer) Has(ctx context.Context, addr swarm.Address) (yes bool, err error)
- func (m *MockStorer) HasMulti(ctx context.Context, addrs ...swarm.Address) (yes []bool, err error)
- func (m *MockStorer) LastPullSubscriptionBinID(bin uint8) (id uint64, err error)
- func (m *MockStorer) MorePull(d ...storage.Descriptor)
- func (m *MockStorer) Put(ctx context.Context, mode storage.ModePut, chs ...swarm.Chunk) (exist []bool, err error)
- func (m *MockStorer) ReserveSample(_ context.Context, _ []byte, _ uint8, _ uint64) (storage.Sample, error)
- func (m *MockStorer) Set(ctx context.Context, mode storage.ModeSet, addrs ...swarm.Address) (err error)
- func (m *MockStorer) SubscribePull(ctx context.Context, bin uint8, since, until uint64) (<-chan storage.Descriptor, <-chan struct{}, func())
- func (m *MockStorer) SubscribePullCalls() int
- func (m *MockStorer) SubscribePush(ctx context.Context, skipf func([]byte) bool) (c <-chan swarm.Chunk, repeat, stop func())
- type Option
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) 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) LastPullSubscriptionBinID ¶
func (m *MockStorer) LastPullSubscriptionBinID(bin uint8) (id uint64, err error)
func (*MockStorer) MorePull ¶
func (m *MockStorer) MorePull(d ...storage.Descriptor)
func (*MockStorer) ReserveSample ¶ added in v1.9.0
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 ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithBaseAddress ¶ added in v0.2.0
func WithPartialInterval ¶
func WithSubscribePullChunks ¶
func WithSubscribePullChunks(chs ...storage.Descriptor) Option
Click to show internal directories.
Click to hide internal directories.