Documentation
¶
Index ¶
- type InMemoryStorage
- func (s *InMemoryStorage) Clear()
- func (s *InMemoryStorage) Close() error
- func (s *InMemoryStorage) Get(req *model.Entry) (*model.Entry, bool)
- func (s *InMemoryStorage) GetByKey(key uint64) (*model.Entry, bool)
- func (s *InMemoryStorage) Len() int64
- func (s *InMemoryStorage) Mem() int64
- func (s *InMemoryStorage) OnTTL(entry *model.Entry) error
- func (s *InMemoryStorage) PeekExpiredTTL() (*model.Entry, bool)
- func (s *InMemoryStorage) Remove(entry *model.Entry) (int64, bool)
- func (s *InMemoryStorage) Set(new *model.Entry) (persisted bool)
- func (s *InMemoryStorage) SoftEvictUntilWithinLimit(backoff int64) (freed, evicted int64)
- func (s *InMemoryStorage) SoftMemoryLimitOvercome() 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) GetByKey ¶ added in v1.8.0
func (s *InMemoryStorage) GetByKey(key uint64) (*model.Entry, bool)
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) OnTTL ¶ added in v1.7.0
func (s *InMemoryStorage) OnTTL(entry *model.Entry) error
func (*InMemoryStorage) PeekExpiredTTL ¶ added in v1.7.0
func (s *InMemoryStorage) PeekExpiredTTL() (*model.Entry, bool)
func (*InMemoryStorage) Remove ¶ added in v1.0.1
func (s *InMemoryStorage) Remove(entry *model.Entry) (int64, bool)
func (*InMemoryStorage) Set ¶ added in v1.0.1
func (s *InMemoryStorage) Set(new *model.Entry) (persisted bool)
func (*InMemoryStorage) SoftEvictUntilWithinLimit ¶ added in v1.6.0
func (s *InMemoryStorage) SoftEvictUntilWithinLimit(backoff int64) (freed, evicted int64)
func (*InMemoryStorage) SoftMemoryLimitOvercome ¶ added in v1.6.0
func (s *InMemoryStorage) SoftMemoryLimitOvercome() 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.