Versions in this module Expand all Collapse all v0 v0.1.0 Jan 15, 2024 Changes in this version + type Level int + const High + const Low + const Medium + type MemoryStore struct + func NewStore(path string, durability Level, logger *slog.Logger) (*MemoryStore, error) + func (s *MemoryStore) Close() error + func (s *MemoryStore) DeleteRange(min, max uint64) (err error) + func (s *MemoryStore) FirstIndex() (uint64, error) + func (s *MemoryStore) Get(key []byte) ([]byte, error) + func (s *MemoryStore) GetLog(index uint64) (*log.LogEntry, error) + func (s *MemoryStore) GetUint64(key []byte) (uint64, error) + func (s *MemoryStore) LastIndex() (uint64, error) + func (s *MemoryStore) Set(key, val []byte) error + func (s *MemoryStore) SetUint64(key []byte, val uint64) error + func (s *MemoryStore) Shrink() error + func (s *MemoryStore) StoreLogs(logs []*log.LogEntry) error + type Store interface + DeleteRange func(min, max uint64) error + FirstIndex func() (uint64, error) + Get func(key []byte) ([]byte, error) + GetLog func(index uint64) (*log.LogEntry, error) + GetUint64 func(key []byte) (uint64, error) + LastIndex func() (uint64, error) + Set func(key []byte, val []byte) error + SetUint64 func(key []byte, val uint64) error + StoreLogs func(logs []*log.LogEntry) error