Documentation ¶
Index ¶
- Variables
- func Copy[T comparable, S any](s map[T]S) map[T]S
- type LoadOrStoreFunc
- type Map
- func (t *Map) ClearAll()
- func (t *Map) Copy() (m Map)
- func (t *Map) CopyP() (m *Map)
- func (t *Map) Delete(k any) (ok bool)
- func (t *Map) Len() int
- func (t *Map) Load(k any) (any, bool)
- func (t *Map) LoadOrStore(k, v any) (actual any, loaded bool)
- func (t *Map) LoadV(k any) (v any)
- func (t *Map) Range(f func(key, value any) bool)
- func (t *Map) Store(k, v any)
- type MapExceeded
- func (t *MapExceeded[K, V]) Copy() (m *MapExceeded[K, V])
- func (t *MapExceeded[K, V]) Delete(k K)
- func (t *MapExceeded[K, V]) GC()
- func (t *MapExceeded[K, V]) Len() int
- func (t *MapExceeded[K, V]) Load(k K) (v V, ok bool)
- func (t *MapExceeded[K, V]) LoadOrStore(k K) (vr V, loaded bool, store func(v1 V, dur time.Duration))
- func (t *MapExceeded[K, V]) Range(f func(key K, value *V) bool)
- func (t *MapExceeded[K, V]) Store(k K, v V, dur time.Duration)
- type RWMutex
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTimeoutToLock = errors.New("ErrTimeoutToLock") ErrTimeoutToULock = errors.New("ErrTimeoutToULock") )
Functions ¶
func Copy ¶ added in v0.24.3
func Copy[T comparable, S any](s map[T]S) map[T]S
Types ¶
type LoadOrStoreFunc ¶ added in v0.28.20240708182044
type LoadOrStoreFunc[T any] struct { Init func() *T // contains filtered or unexported fields }
func (*LoadOrStoreFunc[T]) LoadOrStore ¶ added in v0.28.20240708182044
func (*LoadOrStoreFunc[T]) LoadOrStoreP ¶ added in v0.28.20240708182044
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) LoadOrStore ¶ added in v0.28.1
type MapExceeded ¶ added in v0.27.13
type MapExceeded[K, V any] struct { // contains filtered or unexported fields }
func (*MapExceeded[K, V]) Copy ¶ added in v0.28.20240501064531
func (t *MapExceeded[K, V]) Copy() (m *MapExceeded[K, V])
func (*MapExceeded[K, V]) Delete ¶ added in v0.27.13
func (t *MapExceeded[K, V]) Delete(k K)
func (*MapExceeded[K, V]) GC ¶ added in v0.27.13
func (t *MapExceeded[K, V]) GC()
func (*MapExceeded[K, V]) Len ¶ added in v0.27.13
func (t *MapExceeded[K, V]) Len() int
func (*MapExceeded[K, V]) Load ¶ added in v0.27.13
func (t *MapExceeded[K, V]) Load(k K) (v V, ok bool)
func (*MapExceeded[K, V]) LoadOrStore ¶ added in v0.28.20240501061452
func (t *MapExceeded[K, V]) LoadOrStore(k K) (vr V, loaded bool, store func(v1 V, dur time.Duration))
func (*MapExceeded[K, V]) Range ¶ added in v0.27.13
func (t *MapExceeded[K, V]) Range(f func(key K, value *V) bool)
func (*MapExceeded[K, V]) Store ¶ added in v0.27.13
func (t *MapExceeded[K, V]) Store(k K, v V, dur time.Duration)
Click to show internal directories.
Click to hide internal directories.