Documentation ¶
Index ¶
- type Iterator
- type MutexMap
- func (m *MutexMap[Key, Value]) Clean() map[Key]Value
- func (m *MutexMap[Key, Value]) Delete(k Key)
- func (m *MutexMap[Key, Value]) Len() int
- func (m *MutexMap[Key, Value]) Load(k Key) Value
- func (m *MutexMap[Key, Value]) LoadOk(k Key) (Value, bool)
- func (m *MutexMap[Key, Value]) Range(fn func(key Key, v Value) bool)
- func (m *MutexMap[Key, Value]) Store(k Key, v Value)
- type RWMutexMap
- type Slice
- type SliceMap
- func (m *SliceMap[K, V]) Cap() int
- func (m *SliceMap[K, V]) Delete(key K)
- func (m *SliceMap[K, V]) Len() int
- func (m *SliceMap[K, V]) Load(key K) V
- func (m *SliceMap[K, V]) LoadOk(key K) (V, bool)
- func (m *SliceMap[K, V]) Range(fn func(K, V) (next bool))
- func (m *SliceMap[K, V]) Reset()
- func (m *SliceMap[K, V]) Store(key K, value V)
- type SyncMap118
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator[Elem any] struct { // contains filtered or unexported fields }
Iterator 是一个迭代器, 它能按照你自己设置的规则返回每一次的数据 它的实现不是goroutine安全的
func NewIterator ¶
type MutexMap ¶
type MutexMap[Key comparable, Value any] struct { // contains filtered or unexported fields }
func (*MutexMap[Key, Value]) Clean ¶ added in v0.4.0
func (m *MutexMap[Key, Value]) Clean() map[Key]Value
type RWMutexMap ¶
func (*RWMutexMap[Key, Value]) Delete ¶
func (m *RWMutexMap[Key, Value]) Delete(k Key)
func (*RWMutexMap[Key, Value]) Len ¶
func (m *RWMutexMap[Key, Value]) Len() int
func (*RWMutexMap[Key, Value]) Load ¶
func (m *RWMutexMap[Key, Value]) Load(k Key) Value
func (*RWMutexMap[Key, Value]) LoadOk ¶
func (m *RWMutexMap[Key, Value]) LoadOk(k Key) (Value, bool)
func (*RWMutexMap[Key, Value]) Store ¶
func (m *RWMutexMap[Key, Value]) Store(k Key, v Value)
type Slice ¶
type Slice[V comparable] []V
type SliceMap ¶
type SliceMap[K comparable, V any] struct { // contains filtered or unexported fields }
func NewSliceMap ¶
func NewSliceMap[K comparable, V any](size int) *SliceMap[K, V]
type SyncMap118 ¶
type SyncMap118[Key comparable, Value any] struct { SMap sync.Map // contains filtered or unexported fields }
func (*SyncMap118[Key, Value]) Delete ¶
func (s *SyncMap118[Key, Value]) Delete(k Key)
func (*SyncMap118[Key, Value]) Len ¶
func (s *SyncMap118[Key, Value]) Len() int
func (*SyncMap118[Key, Value]) LoadOk ¶
func (s *SyncMap118[Key, Value]) LoadOk(k Key) (Value, bool)
func (*SyncMap118[Key, Value]) Range ¶ added in v0.3.9
func (s *SyncMap118[Key, Value]) Range(fn func(key Key, value Value) bool)
func (*SyncMap118[Key, Value]) Store ¶
func (s *SyncMap118[Key, Value]) Store(k Key, v Value)
Click to show internal directories.
Click to hide internal directories.