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) 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) (c <-chan swarm.Chunk, 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) 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) (c <-chan swarm.Chunk, stop func())
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.