Versions in this module Expand all Collapse all v1 v1.0.0 Aug 7, 2025 Changes in this version + func DefaultIterCb[K Stringer, V any](key K, v V) + func DefaultRemoveCb[K Stringer, V any](key K, v V, exists bool) bool + func DefaultUpsertCb[K Stringer, V any](exist bool, valueInMap V, newValue V) V + type ConcurrentMapInterface interface + Clear func() + Count func() int + Get func(key K) (V, bool) + GetSlot func(key K) *ConcurrentMapSlotted[K, V] + GetSlotNum func() int + Has func(key K) bool + IsEmpty func() bool + Items func() map[K]V + Iter func() <-chan Tuple[K, V] + IterCb func(key K, v V, cb IterCb[K, V]) + Keys func() []K + MSet func(data map[K]V) + MarshalJSON func() ([]byte, error) + Pop func(key K) (v V, ok bool) + Remove func(key K) + RemoveCb func(key K, cb RemoveCb[K, V]) bool + Set func(key K, value V) + SetIfAbsent func(key K, value V) bool + Tuples func() []Tuple[K, V] + UnmarshalJSON func(b []byte) error + Upsert func(key K, value V, cb UpsertCb[K, V]) V + func New[K Stringer, V any](opts ...ConcurrentMapOption[K, V]) ConcurrentMapInterface[K, V] + type ConcurrentMapOption func(*concurrentMap[K, V]) + func WithConcurrentMapSlotNum[K Stringer, V any](slotNum int) ConcurrentMapOption[K, V] + func WithConcurrentMapSloting[K Stringer, V any](sloting func(key K) uint32) ConcurrentMapOption[K, V] + type ConcurrentMapSlotted struct + type Integer int + func (i Integer) String() string + type Integer32 int32 + func (i Integer32) String() string + type IterCb func(key K, v V) + type MockConcurrentMapInterface struct + func NewMockConcurrentMapInterface[K Stringer, V any](t interface{ ... }) *MockConcurrentMapInterface[K, V] + func (_m *MockConcurrentMapInterface[K, V]) EXPECT() *MockConcurrentMapInterface_Expecter[K, V] + func (_mock *MockConcurrentMapInterface[K, V]) Clear() + func (_mock *MockConcurrentMapInterface[K, V]) Count() int + func (_mock *MockConcurrentMapInterface[K, V]) Get(key K) (V, bool) + func (_mock *MockConcurrentMapInterface[K, V]) GetSlot(key K) *ConcurrentMapSlotted[K, V] + func (_mock *MockConcurrentMapInterface[K, V]) GetSlotNum() int + func (_mock *MockConcurrentMapInterface[K, V]) GetSlotkeyNum(idx int) int + func (_mock *MockConcurrentMapInterface[K, V]) GetSlots(idx int) *ConcurrentMapSlotted[K, V] + func (_mock *MockConcurrentMapInterface[K, V]) Has(key K) bool + func (_mock *MockConcurrentMapInterface[K, V]) IsEmpty() bool + func (_mock *MockConcurrentMapInterface[K, V]) Items() map[K]V + func (_mock *MockConcurrentMapInterface[K, V]) Iter() <-chan Tuple[K, V] + func (_mock *MockConcurrentMapInterface[K, V]) IterCb(key K, v V, cb IterCb[K, V]) + func (_mock *MockConcurrentMapInterface[K, V]) Keys() []K + func (_mock *MockConcurrentMapInterface[K, V]) ListSlots() []*ConcurrentMapSlotted[K, V] + func (_mock *MockConcurrentMapInterface[K, V]) MSet(data map[K]V) + func (_mock *MockConcurrentMapInterface[K, V]) MarshalJSON() ([]byte, error) + func (_mock *MockConcurrentMapInterface[K, V]) Pop(key K) (V, bool) + func (_mock *MockConcurrentMapInterface[K, V]) Remove(key K) + func (_mock *MockConcurrentMapInterface[K, V]) RemoveCb(key K, cb RemoveCb[K, V]) bool + func (_mock *MockConcurrentMapInterface[K, V]) Set(key K, value V) + func (_mock *MockConcurrentMapInterface[K, V]) SetIfAbsent(key K, value V) bool + func (_mock *MockConcurrentMapInterface[K, V]) Tuples() []Tuple[K, V] + func (_mock *MockConcurrentMapInterface[K, V]) UnmarshalJSON(b []byte) error + func (_mock *MockConcurrentMapInterface[K, V]) Upsert(key K, value V, cb UpsertCb[K, V]) V + type MockConcurrentMapInterface_Clear_Call struct + func (_c *MockConcurrentMapInterface_Clear_Call[K, V]) Return() *MockConcurrentMapInterface_Clear_Call[K, V] + func (_c *MockConcurrentMapInterface_Clear_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_Clear_Call[K, V] + func (_c *MockConcurrentMapInterface_Clear_Call[K, V]) RunAndReturn(run func()) *MockConcurrentMapInterface_Clear_Call[K, V] + type MockConcurrentMapInterface_Count_Call struct + func (_c *MockConcurrentMapInterface_Count_Call[K, V]) Return(n int) *MockConcurrentMapInterface_Count_Call[K, V] + func (_c *MockConcurrentMapInterface_Count_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_Count_Call[K, V] + func (_c *MockConcurrentMapInterface_Count_Call[K, V]) RunAndReturn(run func() int) *MockConcurrentMapInterface_Count_Call[K, V] + type MockConcurrentMapInterface_Expecter struct + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Clear() *MockConcurrentMapInterface_Clear_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Count() *MockConcurrentMapInterface_Count_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Get(key interface{}) *MockConcurrentMapInterface_Get_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) GetSlot(key interface{}) *MockConcurrentMapInterface_GetSlot_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) GetSlotNum() *MockConcurrentMapInterface_GetSlotNum_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) GetSlotkeyNum(idx interface{}) *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) GetSlots(idx interface{}) *MockConcurrentMapInterface_GetSlots_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Has(key interface{}) *MockConcurrentMapInterface_Has_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) IsEmpty() *MockConcurrentMapInterface_IsEmpty_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Items() *MockConcurrentMapInterface_Items_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Iter() *MockConcurrentMapInterface_Iter_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) IterCb(key interface{}, v interface{}, cb interface{}) *MockConcurrentMapInterface_IterCb_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Keys() *MockConcurrentMapInterface_Keys_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) ListSlots() *MockConcurrentMapInterface_ListSlots_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) MSet(data interface{}) *MockConcurrentMapInterface_MSet_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) MarshalJSON() *MockConcurrentMapInterface_MarshalJSON_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Pop(key interface{}) *MockConcurrentMapInterface_Pop_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Remove(key interface{}) *MockConcurrentMapInterface_Remove_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) RemoveCb(key interface{}, cb interface{}) *MockConcurrentMapInterface_RemoveCb_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Set(key interface{}, value interface{}) *MockConcurrentMapInterface_Set_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) SetIfAbsent(key interface{}, value interface{}) *MockConcurrentMapInterface_SetIfAbsent_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Tuples() *MockConcurrentMapInterface_Tuples_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) UnmarshalJSON(b interface{}) *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V] + func (_e *MockConcurrentMapInterface_Expecter[K, V]) Upsert(key interface{}, value interface{}, cb interface{}) *MockConcurrentMapInterface_Upsert_Call[K, V] + type MockConcurrentMapInterface_GetSlotNum_Call struct + func (_c *MockConcurrentMapInterface_GetSlotNum_Call[K, V]) Return(n int) *MockConcurrentMapInterface_GetSlotNum_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlotNum_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_GetSlotNum_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlotNum_Call[K, V]) RunAndReturn(run func() int) *MockConcurrentMapInterface_GetSlotNum_Call[K, V] + type MockConcurrentMapInterface_GetSlot_Call struct + func (_c *MockConcurrentMapInterface_GetSlot_Call[K, V]) Return(concurrentMapSlotted *ConcurrentMapSlotted[K, V]) *MockConcurrentMapInterface_GetSlot_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlot_Call[K, V]) Run(run func(key K)) *MockConcurrentMapInterface_GetSlot_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlot_Call[K, V]) RunAndReturn(run func(key K) *ConcurrentMapSlotted[K, V]) *MockConcurrentMapInterface_GetSlot_Call[K, V] + type MockConcurrentMapInterface_GetSlotkeyNum_Call struct + func (_c *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V]) Return(n int) *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V]) Run(run func(idx int)) *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V]) RunAndReturn(run func(idx int) int) *MockConcurrentMapInterface_GetSlotkeyNum_Call[K, V] + type MockConcurrentMapInterface_GetSlots_Call struct + func (_c *MockConcurrentMapInterface_GetSlots_Call[K, V]) Return(concurrentMapSlotted *ConcurrentMapSlotted[K, V]) *MockConcurrentMapInterface_GetSlots_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlots_Call[K, V]) Run(run func(idx int)) *MockConcurrentMapInterface_GetSlots_Call[K, V] + func (_c *MockConcurrentMapInterface_GetSlots_Call[K, V]) RunAndReturn(run func(idx int) *ConcurrentMapSlotted[K, V]) *MockConcurrentMapInterface_GetSlots_Call[K, V] + type MockConcurrentMapInterface_Get_Call struct + func (_c *MockConcurrentMapInterface_Get_Call[K, V]) Return(v V, b bool) *MockConcurrentMapInterface_Get_Call[K, V] + func (_c *MockConcurrentMapInterface_Get_Call[K, V]) Run(run func(key K)) *MockConcurrentMapInterface_Get_Call[K, V] + func (_c *MockConcurrentMapInterface_Get_Call[K, V]) RunAndReturn(run func(key K) (V, bool)) *MockConcurrentMapInterface_Get_Call[K, V] + type MockConcurrentMapInterface_Has_Call struct + func (_c *MockConcurrentMapInterface_Has_Call[K, V]) Return(b bool) *MockConcurrentMapInterface_Has_Call[K, V] + func (_c *MockConcurrentMapInterface_Has_Call[K, V]) Run(run func(key K)) *MockConcurrentMapInterface_Has_Call[K, V] + func (_c *MockConcurrentMapInterface_Has_Call[K, V]) RunAndReturn(run func(key K) bool) *MockConcurrentMapInterface_Has_Call[K, V] + type MockConcurrentMapInterface_IsEmpty_Call struct + func (_c *MockConcurrentMapInterface_IsEmpty_Call[K, V]) Return(b bool) *MockConcurrentMapInterface_IsEmpty_Call[K, V] + func (_c *MockConcurrentMapInterface_IsEmpty_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_IsEmpty_Call[K, V] + func (_c *MockConcurrentMapInterface_IsEmpty_Call[K, V]) RunAndReturn(run func() bool) *MockConcurrentMapInterface_IsEmpty_Call[K, V] + type MockConcurrentMapInterface_Items_Call struct + func (_c *MockConcurrentMapInterface_Items_Call[K, V]) Return(vToV map[K]V) *MockConcurrentMapInterface_Items_Call[K, V] + func (_c *MockConcurrentMapInterface_Items_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_Items_Call[K, V] + func (_c *MockConcurrentMapInterface_Items_Call[K, V]) RunAndReturn(run func() map[K]V) *MockConcurrentMapInterface_Items_Call[K, V] + type MockConcurrentMapInterface_IterCb_Call struct + func (_c *MockConcurrentMapInterface_IterCb_Call[K, V]) Return() *MockConcurrentMapInterface_IterCb_Call[K, V] + func (_c *MockConcurrentMapInterface_IterCb_Call[K, V]) Run(run func(key K, v V, cb IterCb[K, V])) *MockConcurrentMapInterface_IterCb_Call[K, V] + func (_c *MockConcurrentMapInterface_IterCb_Call[K, V]) RunAndReturn(run func(key K, v V, cb IterCb[K, V])) *MockConcurrentMapInterface_IterCb_Call[K, V] + type MockConcurrentMapInterface_Iter_Call struct + func (_c *MockConcurrentMapInterface_Iter_Call[K, V]) Return(tupleCh <-chan Tuple[K, V]) *MockConcurrentMapInterface_Iter_Call[K, V] + func (_c *MockConcurrentMapInterface_Iter_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_Iter_Call[K, V] + func (_c *MockConcurrentMapInterface_Iter_Call[K, V]) RunAndReturn(run func() <-chan Tuple[K, V]) *MockConcurrentMapInterface_Iter_Call[K, V] + type MockConcurrentMapInterface_Keys_Call struct + func (_c *MockConcurrentMapInterface_Keys_Call[K, V]) Return(vs []K) *MockConcurrentMapInterface_Keys_Call[K, V] + func (_c *MockConcurrentMapInterface_Keys_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_Keys_Call[K, V] + func (_c *MockConcurrentMapInterface_Keys_Call[K, V]) RunAndReturn(run func() []K) *MockConcurrentMapInterface_Keys_Call[K, V] + type MockConcurrentMapInterface_ListSlots_Call struct + func (_c *MockConcurrentMapInterface_ListSlots_Call[K, V]) Return(concurrentMapSlotteds []*ConcurrentMapSlotted[K, V]) *MockConcurrentMapInterface_ListSlots_Call[K, V] + func (_c *MockConcurrentMapInterface_ListSlots_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_ListSlots_Call[K, V] + func (_c *MockConcurrentMapInterface_ListSlots_Call[K, V]) RunAndReturn(run func() []*ConcurrentMapSlotted[K, V]) *MockConcurrentMapInterface_ListSlots_Call[K, V] + type MockConcurrentMapInterface_MSet_Call struct + func (_c *MockConcurrentMapInterface_MSet_Call[K, V]) Return() *MockConcurrentMapInterface_MSet_Call[K, V] + func (_c *MockConcurrentMapInterface_MSet_Call[K, V]) Run(run func(data map[K]V)) *MockConcurrentMapInterface_MSet_Call[K, V] + func (_c *MockConcurrentMapInterface_MSet_Call[K, V]) RunAndReturn(run func(data map[K]V)) *MockConcurrentMapInterface_MSet_Call[K, V] + type MockConcurrentMapInterface_MarshalJSON_Call struct + func (_c *MockConcurrentMapInterface_MarshalJSON_Call[K, V]) Return(bytes []byte, err error) *MockConcurrentMapInterface_MarshalJSON_Call[K, V] + func (_c *MockConcurrentMapInterface_MarshalJSON_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_MarshalJSON_Call[K, V] + func (_c *MockConcurrentMapInterface_MarshalJSON_Call[K, V]) RunAndReturn(run func() ([]byte, error)) *MockConcurrentMapInterface_MarshalJSON_Call[K, V] + type MockConcurrentMapInterface_Pop_Call struct + func (_c *MockConcurrentMapInterface_Pop_Call[K, V]) Return(v V, ok bool) *MockConcurrentMapInterface_Pop_Call[K, V] + func (_c *MockConcurrentMapInterface_Pop_Call[K, V]) Run(run func(key K)) *MockConcurrentMapInterface_Pop_Call[K, V] + func (_c *MockConcurrentMapInterface_Pop_Call[K, V]) RunAndReturn(run func(key K) (V, bool)) *MockConcurrentMapInterface_Pop_Call[K, V] + type MockConcurrentMapInterface_RemoveCb_Call struct + func (_c *MockConcurrentMapInterface_RemoveCb_Call[K, V]) Return(b bool) *MockConcurrentMapInterface_RemoveCb_Call[K, V] + func (_c *MockConcurrentMapInterface_RemoveCb_Call[K, V]) Run(run func(key K, cb RemoveCb[K, V])) *MockConcurrentMapInterface_RemoveCb_Call[K, V] + func (_c *MockConcurrentMapInterface_RemoveCb_Call[K, V]) RunAndReturn(run func(key K, cb RemoveCb[K, V]) bool) *MockConcurrentMapInterface_RemoveCb_Call[K, V] + type MockConcurrentMapInterface_Remove_Call struct + func (_c *MockConcurrentMapInterface_Remove_Call[K, V]) Return() *MockConcurrentMapInterface_Remove_Call[K, V] + func (_c *MockConcurrentMapInterface_Remove_Call[K, V]) Run(run func(key K)) *MockConcurrentMapInterface_Remove_Call[K, V] + func (_c *MockConcurrentMapInterface_Remove_Call[K, V]) RunAndReturn(run func(key K)) *MockConcurrentMapInterface_Remove_Call[K, V] + type MockConcurrentMapInterface_SetIfAbsent_Call struct + func (_c *MockConcurrentMapInterface_SetIfAbsent_Call[K, V]) Return(b bool) *MockConcurrentMapInterface_SetIfAbsent_Call[K, V] + func (_c *MockConcurrentMapInterface_SetIfAbsent_Call[K, V]) Run(run func(key K, value V)) *MockConcurrentMapInterface_SetIfAbsent_Call[K, V] + func (_c *MockConcurrentMapInterface_SetIfAbsent_Call[K, V]) RunAndReturn(run func(key K, value V) bool) *MockConcurrentMapInterface_SetIfAbsent_Call[K, V] + type MockConcurrentMapInterface_Set_Call struct + func (_c *MockConcurrentMapInterface_Set_Call[K, V]) Return() *MockConcurrentMapInterface_Set_Call[K, V] + func (_c *MockConcurrentMapInterface_Set_Call[K, V]) Run(run func(key K, value V)) *MockConcurrentMapInterface_Set_Call[K, V] + func (_c *MockConcurrentMapInterface_Set_Call[K, V]) RunAndReturn(run func(key K, value V)) *MockConcurrentMapInterface_Set_Call[K, V] + type MockConcurrentMapInterface_Tuples_Call struct + func (_c *MockConcurrentMapInterface_Tuples_Call[K, V]) Return(tuples []Tuple[K, V]) *MockConcurrentMapInterface_Tuples_Call[K, V] + func (_c *MockConcurrentMapInterface_Tuples_Call[K, V]) Run(run func()) *MockConcurrentMapInterface_Tuples_Call[K, V] + func (_c *MockConcurrentMapInterface_Tuples_Call[K, V]) RunAndReturn(run func() []Tuple[K, V]) *MockConcurrentMapInterface_Tuples_Call[K, V] + type MockConcurrentMapInterface_UnmarshalJSON_Call struct + func (_c *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V]) Return(err error) *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V] + func (_c *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V]) Run(run func(b []byte)) *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V] + func (_c *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V]) RunAndReturn(run func(b []byte) error) *MockConcurrentMapInterface_UnmarshalJSON_Call[K, V] + type MockConcurrentMapInterface_Upsert_Call struct + func (_c *MockConcurrentMapInterface_Upsert_Call[K, V]) Return(v V) *MockConcurrentMapInterface_Upsert_Call[K, V] + func (_c *MockConcurrentMapInterface_Upsert_Call[K, V]) Run(run func(key K, value V, cb UpsertCb[K, V])) *MockConcurrentMapInterface_Upsert_Call[K, V] + func (_c *MockConcurrentMapInterface_Upsert_Call[K, V]) RunAndReturn(run func(key K, value V, cb UpsertCb[K, V]) V) *MockConcurrentMapInterface_Upsert_Call[K, V] + type MockStringer struct + func NewMockStringer(t interface{ ... }) *MockStringer + func (_m *MockStringer) EXPECT() *MockStringer_Expecter + func (_mock *MockStringer) String() string + type MockStringer_Expecter struct + func (_e *MockStringer_Expecter) String() *MockStringer_String_Call + type MockStringer_String_Call struct + func (_c *MockStringer_String_Call) Return(s string) *MockStringer_String_Call + func (_c *MockStringer_String_Call) Run(run func()) *MockStringer_String_Call + func (_c *MockStringer_String_Call) RunAndReturn(run func() string) *MockStringer_String_Call + type RemoveCb func(key K, v V, exists bool) bool + type SlotingFunc func(key K) uint32 + type String string + func (s String) String() string + type Stringer interface + type Tuple struct + Key K + Value V + type UpsertCb func(exist bool, valueInMap V, newValue V) V