Documentation ¶
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) Get(_ context.Context, _ storage.ModeGet, addr swarm.Address) (ch swarm.Chunk, err error)
- func (s *Store) GetMulti(_ context.Context, _ storage.ModeGet, _ ...swarm.Address) (ch []swarm.Chunk, err error)
- func (s *Store) Has(_ context.Context, _ swarm.Address) (yes bool, err error)
- func (s *Store) HasMulti(_ context.Context, _ ...swarm.Address) (yes []bool, err error)
- func (s *Store) LastPullSubscriptionBinID(_ uint8) (id uint64, err error)
- func (s *Store) Put(_ context.Context, _ storage.ModePut, chs ...swarm.Chunk) (exist []bool, err error)
- func (s *Store) ReserveSample(_ context.Context, _ []byte, _ uint8) (storage.Sample, error)
- func (s *Store) Set(_ context.Context, _ storage.ModeSet, _ ...swarm.Address) (err error)
- func (s *Store) SubscribePull(_ context.Context, _ uint8, _ uint64, _ uint64) (c <-chan storage.Descriptor, closed <-chan struct{}, stop func())
- func (s *Store) SubscribePush(_ context.Context, _ func([]byte) bool) (c <-chan swarm.Chunk, repeat func(), stop func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements a simple Putter and Getter which can be used to temporarily cache chunks. Currently this is used in the bootstrapping process of new nodes where we sync the postage events from the swarm network.
func (*Store) LastPullSubscriptionBinID ¶
func (*Store) ReserveSample ¶ added in v1.9.0
func (*Store) SubscribePull ¶
Click to show internal directories.
Click to hide internal directories.