Versions in this module Expand all Collapse all v0 v0.7.1 Sep 14, 2022 v0.7.0 Jul 8, 2022 Changes in this version + const LocationSize + var ErrQuitting = errors.New("quitting") + var ErrShardNotFound = errors.New("shard not found") + var ErrTooLong = errors.New("data too long") + type Location struct + Length uint16 + Shard uint8 + Slot uint32 + func LocationFromBinary(buf []byte) (Location, error) + func (l *Location) MarshalBinary() ([]byte, error) + func (l *Location) UnmarshalBinary(buf []byte) error + type Recovery struct + func NewRecovery(dir string, shardCnt int, datasize int) (*Recovery, error) + func (r *Recovery) Add(loc Location) error + func (r *Recovery) Close() error + func (r *Recovery) Save() error + type Store struct + func New(basedir fs.FS, shardCnt int, maxDataSize int) (*Store, error) + func (s *Store) Close() error + func (s *Store) Metrics() []prometheus.Collector + func (s *Store) Read(ctx context.Context, loc Location, buf []byte) (err error) + func (s *Store) Release(ctx context.Context, loc Location) error + func (s *Store) Write(ctx context.Context, data []byte) (loc Location, err error)