Documentation
¶
Index ¶
- func InArray[T comparable](arr []T, key T) bool
- type ConcurrentMap
- func (container *ConcurrentMap[Key, T]) Del(key Key)
- func (container *ConcurrentMap[Key, T]) Find(key Key) (item T, err error)
- func (container *ConcurrentMap[Key, T]) Get(key Key) (item T, exist bool)
- func (container *ConcurrentMap[Key, T]) Iterator(fn func(key Key, val T))
- func (container *ConcurrentMap[Key, T]) Len() int
- func (container *ConcurrentMap[Key, T]) Set(key Key, value T)
- type KeyType
- type LockFreeMap
- func (container *LockFreeMap[Key, T]) Del(key Key)
- func (container *LockFreeMap[Key, T]) Find(key Key) (item T, err error)
- func (container *LockFreeMap[Key, T]) Get(key Key) (item T, exist bool)
- func (container *LockFreeMap[Key, T]) Iterator(fn func(key Key, val T))
- func (container *LockFreeMap[Key, T]) Len() int
- func (container *LockFreeMap[Key, T]) Set(key Key, value T)
- type Map
- type Queue
- type Sharding
- type Singleton
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InArray ¶ added in v1.1.8
func InArray[T comparable](arr []T, key T) bool
Types ¶
type ConcurrentMap ¶
ConcurrentMap represents safe concurrent map container
func NewConcurrentMap ¶
func NewConcurrentMap[Key KeyType, T any]() *ConcurrentMap[Key, T]
func (*ConcurrentMap[Key, T]) Del ¶ added in v1.1.5
func (container *ConcurrentMap[Key, T]) Del(key Key)
Del remove keys from container
func (*ConcurrentMap[Key, T]) Find ¶
func (container *ConcurrentMap[Key, T]) Find(key Key) (item T, err error)
Find returns item if key is not exist, returns not found error
func (*ConcurrentMap[Key, T]) Get ¶
func (container *ConcurrentMap[Key, T]) Get(key Key) (item T, exist bool)
Get return item and exist
func (*ConcurrentMap[Key, T]) Iterator ¶ added in v1.1.8
func (container *ConcurrentMap[Key, T]) Iterator(fn func(key Key, val T))
func (*ConcurrentMap[Key, T]) Len ¶ added in v1.1.8
func (container *ConcurrentMap[Key, T]) Len() int
func (*ConcurrentMap[Key, T]) Set ¶
func (container *ConcurrentMap[Key, T]) Set(key Key, value T)
Set sets map item
type LockFreeMap ¶ added in v1.1.9
func NewLockFreeMap ¶ added in v1.1.9
func NewLockFreeMap[Key KeyType, T any]() *LockFreeMap[Key, T]
func (*LockFreeMap[Key, T]) Del ¶ added in v1.1.9
func (container *LockFreeMap[Key, T]) Del(key Key)
Del remove keys from container
func (*LockFreeMap[Key, T]) Find ¶ added in v1.1.9
func (container *LockFreeMap[Key, T]) Find(key Key) (item T, err error)
Find returns item if key is not exist, returns not found error
func (*LockFreeMap[Key, T]) Get ¶ added in v1.1.9
func (container *LockFreeMap[Key, T]) Get(key Key) (item T, exist bool)
Get return item and exist
func (*LockFreeMap[Key, T]) Iterator ¶ added in v1.1.9
func (container *LockFreeMap[Key, T]) Iterator(fn func(key Key, val T))
func (*LockFreeMap[Key, T]) Len ¶ added in v1.1.9
func (container *LockFreeMap[Key, T]) Len() int
func (*LockFreeMap[Key, T]) Set ¶ added in v1.1.9
func (container *LockFreeMap[Key, T]) Set(key Key, value T)
Set sets map item
type Queue ¶ added in v1.1.7
type Queue[T any] struct { // contains filtered or unexported fields }
Queue represents a queue of any object
Click to show internal directories.
Click to hide internal directories.