Documentation ¶
Index ¶
- func AllPurge()
- func New[K comparable, V any](name string, replaceFn func(ctx context.Context, key K) (V, error), ...) (*sc.Cache[K, V], error)
- type AtomicMap
- func (m *AtomicMap[K, V, T]) Forget(key K)
- func (m *AtomicMap[K, V, T]) Len() int
- func (m *AtomicMap[K, V, T]) Load(key K) (V, bool)
- func (m *AtomicMap[K, V, T]) LoadFromGob(r io.Reader) error
- func (m *AtomicMap[K, V, T]) LoadOrStore(key K, value V) (V, bool)
- func (m *AtomicMap[K, V, T]) Purge()
- func (m *AtomicMap[K, V, T]) Range(f func(K, V) bool)
- func (m *AtomicMap[K, V, T]) RangeUpdate(f func(K, V) (V, bool))
- func (m *AtomicMap[K, V, T]) Store(key K, value V)
- func (m *AtomicMap[K, V, T]) Update(key K, f func(V) (V, bool))
- func (m *AtomicMap[K, V, T]) WriteToGob(w io.Writer) error
- type BPTree
- type Map
- func (m *Map[K, V]) Forget(key K)
- func (m *Map[K, V]) Len() int
- func (m *Map[K, V]) Load(key K) (V, bool)
- func (m *Map[K, V]) LoadFromGob(r io.Reader) error
- func (m *Map[K, V]) LoadOrStore(key K, value V) (V, bool)
- func (m *Map[K, V]) Purge()
- func (m *Map[K, V]) Range(f func(K, V) bool)
- func (m *Map[K, V]) RangeUpdate(f func(K, V) (V, bool))
- func (m *Map[K, V]) Store(key K, value V)
- func (m *Map[K, V]) Update(key K, f func(V) (V, bool))
- func (m *Map[K, V]) WriteToGob(w io.Writer) error
- type NoDeleteSlice
- func (s *NoDeleteSlice[T]) Append(values ...T)
- func (s *NoDeleteSlice[T]) Cap() int
- func (s *NoDeleteSlice[T]) Get(i int) (T, bool)
- func (s *NoDeleteSlice[T]) Len() int
- func (s *NoDeleteSlice[T]) Purge()
- func (s *NoDeleteSlice[T]) Range(f func(int, T) bool)
- func (s *NoDeleteSlice[T]) Set(index int, value T)
- func (s *NoDeleteSlice[T]) Slice(start, end int) *NoDeleteSlice[T]
- type Slice
- func (s *Slice[T]) Append(values ...T)
- func (s *Slice[T]) Edit(f func([]T) []T)
- func (s *Slice[T]) Get(i int) (T, bool)
- func (s *Slice[T]) Len() int
- func (s *Slice[T]) LoadFromGob(r io.Reader) error
- func (s *Slice[T]) Purge()
- func (s *Slice[T]) Range(f func(int, T) bool)
- func (s *Slice[T]) Set(index int, value T)
- func (s *Slice[T]) Slice(start, end int, f func([]T))
- func (s *Slice[T]) WriteToGob(w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AtomicMap ¶
type AtomicMap[K comparable, V *T, T any] struct { // contains filtered or unexported fields }
func NewAtomicMap ¶
func NewAtomicMap[K comparable, V *T, T any](name string) *AtomicMap[K, V, T]
func (*AtomicMap[K, V, T]) LoadFromGob ¶
func (*AtomicMap[K, V, T]) LoadOrStore ¶
func (*AtomicMap[K, V, T]) RangeUpdate ¶
type BPTree ¶
func NewBPTreeWithOrdered ¶
func NewBPTreeWithTime ¶
func (*BPTree[K, V]) ReverseSlice ¶
func (t *BPTree[K, V]) ReverseSlice(start, end K) []V
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Map[K, V]) LoadOrStore ¶
func (*Map[K, V]) RangeUpdate ¶
type NoDeleteSlice ¶
type NoDeleteSlice[T any] struct { // contains filtered or unexported fields }
func NewNoDeleteSlice ¶
func NewNoDeleteSlice[T any](name string, capacity, shard int) *NoDeleteSlice[T]
func (*NoDeleteSlice[T]) Append ¶
func (s *NoDeleteSlice[T]) Append(values ...T)
func (*NoDeleteSlice[T]) Cap ¶
func (s *NoDeleteSlice[T]) Cap() int
func (*NoDeleteSlice[T]) Get ¶
func (s *NoDeleteSlice[T]) Get(i int) (T, bool)
func (*NoDeleteSlice[T]) Len ¶
func (s *NoDeleteSlice[T]) Len() int
func (*NoDeleteSlice[T]) Purge ¶
func (s *NoDeleteSlice[T]) Purge()
func (*NoDeleteSlice[T]) Range ¶
func (s *NoDeleteSlice[T]) Range(f func(int, T) bool)
func (*NoDeleteSlice[T]) Set ¶
func (s *NoDeleteSlice[T]) Set(index int, value T)
func (*NoDeleteSlice[T]) Slice ¶
func (s *NoDeleteSlice[T]) Slice(start, end int) *NoDeleteSlice[T]
Click to show internal directories.
Click to hide internal directories.