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 ¶ added in v1.2.1
type AtomicMap[K comparable, V *T, T any] struct { // contains filtered or unexported fields }
func NewAtomicMap ¶ added in v1.2.1
func NewAtomicMap[K comparable, V *T, T any](name string) *AtomicMap[K, V, T]
func (*AtomicMap[K, V, T]) LoadFromGob ¶ added in v1.7.0
func (*AtomicMap[K, V, T]) LoadOrStore ¶ added in v1.10.0
func (*AtomicMap[K, V, T]) RangeUpdate ¶ added in v1.7.0
func (*AtomicMap[K, V, T]) Store ¶ added in v1.2.1
func (m *AtomicMap[K, V, T]) Store(key K, value V)
type BPTree ¶ added in v1.14.1
func NewBPTreeWithOrdered ¶ added in v1.14.1
func NewBPTreeWithTime ¶ added in v1.14.1
func (*BPTree[K, V]) ReverseSlice ¶ added in v1.14.1
func (t *BPTree[K, V]) ReverseSlice(start, end K) []V
type Map ¶ added in v1.2.0
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Map[K, V]) LoadOrStore ¶ added in v1.10.0
func (*Map[K, V]) RangeUpdate ¶ added in v1.7.0
type NoDeleteSlice ¶ added in v1.14.0
type NoDeleteSlice[T any] struct { // contains filtered or unexported fields }
func NewNoDeleteSlice ¶ added in v1.14.0
func NewNoDeleteSlice[T any](name string, capacity, shard int) *NoDeleteSlice[T]
func (*NoDeleteSlice[T]) Append ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Append(values ...T)
func (*NoDeleteSlice[T]) Cap ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Cap() int
func (*NoDeleteSlice[T]) Get ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Get(i int) (T, bool)
func (*NoDeleteSlice[T]) Len ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Len() int
func (*NoDeleteSlice[T]) Purge ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Purge()
func (*NoDeleteSlice[T]) Range ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Range(f func(int, T) bool)
func (*NoDeleteSlice[T]) Set ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Set(index int, value T)
func (*NoDeleteSlice[T]) Slice ¶ added in v1.14.0
func (s *NoDeleteSlice[T]) Slice(start, end int) *NoDeleteSlice[T]
Click to show internal directories.
Click to hide internal directories.