Documentation
¶
Index ¶
- type InMemoryStorage
- func (s *InMemoryStorage) Clear()
- func (s *InMemoryStorage) Close() error
- func (s *InMemoryStorage) EvictN(n, shardSample, entriesSample int) (freedBytes, items int64)
- func (s *InMemoryStorage) Get(req *model.Entry) (*model.Entry, bool)
- func (s *InMemoryStorage) Len() int64
- func (s *InMemoryStorage) Mem() int64
- func (s *InMemoryStorage) Rand() (*model.Entry, bool)
- func (s *InMemoryStorage) Refresh(entry *model.Entry) error
- func (s *InMemoryStorage) Remove(entry *model.Entry) (freedBytes int64, hit bool)
- func (s *InMemoryStorage) ScanOutdatedN(dst []*model.Entry, shardSample, entrySample int) (out []*model.Entry, found int)
- func (s *InMemoryStorage) Set(new *model.Entry) (persisted bool)
- func (s *InMemoryStorage) ShouldEvictHard() (diffBytes int64, should bool)
- func (s *InMemoryStorage) ShouldEvictSoft() (diffBytes int64, should bool)
- func (s *InMemoryStorage) Stat() (bytes int64, length int64)
- func (s *InMemoryStorage) WalkShards(ctx context.Context, fn func(key uint64, shard *sharded.Shard[*model.Entry]))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryStorage ¶ added in v1.0.1
type InMemoryStorage struct {
// contains filtered or unexported fields
}
func NewInMemory ¶ added in v1.5.0
func (*InMemoryStorage) Clear ¶ added in v1.0.1
func (s *InMemoryStorage) Clear()
func (*InMemoryStorage) Close ¶ added in v1.1.1
func (s *InMemoryStorage) Close() error
func (*InMemoryStorage) EvictN ¶ added in v1.5.0
func (s *InMemoryStorage) EvictN(n, shardSample, entriesSample int) (freedBytes, items int64)
func (*InMemoryStorage) Len ¶ added in v1.0.1
func (s *InMemoryStorage) Len() int64
func (*InMemoryStorage) Mem ¶ added in v1.0.1
func (s *InMemoryStorage) Mem() int64
func (*InMemoryStorage) Rand ¶ added in v1.0.1
func (s *InMemoryStorage) Rand() (*model.Entry, bool)
func (*InMemoryStorage) Refresh ¶ added in v1.5.0
func (s *InMemoryStorage) Refresh(entry *model.Entry) error
func (*InMemoryStorage) Remove ¶ added in v1.0.1
func (s *InMemoryStorage) Remove(entry *model.Entry) (freedBytes int64, hit bool)
func (*InMemoryStorage) ScanOutdatedN ¶ added in v1.5.0
func (*InMemoryStorage) Set ¶ added in v1.0.1
func (s *InMemoryStorage) Set(new *model.Entry) (persisted bool)
func (*InMemoryStorage) ShouldEvictHard ¶ added in v1.5.0
func (s *InMemoryStorage) ShouldEvictHard() (diffBytes int64, should bool)
func (*InMemoryStorage) ShouldEvictSoft ¶ added in v1.5.0
func (s *InMemoryStorage) ShouldEvictSoft() (diffBytes int64, should bool)
func (*InMemoryStorage) Stat ¶ added in v1.0.1
func (s *InMemoryStorage) Stat() (bytes int64, length int64)
func (*InMemoryStorage) WalkShards ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.