Documentation ¶
Index ¶
- func WithCustomHasher[K comparable, V any](h func(key K) uint64) func(csMap *CsMap[K, V])
- func WithShardCount[K comparable, V any](count uint64) func(csMap *CsMap[K, V])
- func WithSize[K comparable, V any](size uint64) func(csMap *CsMap[K, V])
- type CsMap
- func (m *CsMap[K, V]) Clear()
- func (m *CsMap[K, V]) Count() int
- func (m *CsMap[K, V]) Delete(key K) bool
- func (m *CsMap[K, V]) DeleteIf(key K, condition func(value V) bool) bool
- func (m *CsMap[K, V]) Has(key K) bool
- func (m *CsMap[K, V]) IsEmpty() bool
- func (m *CsMap[K, V]) Load(key K) (V, bool)
- func (m *CsMap[K, V]) MarshalJSON() ([]byte, error)
- func (m *CsMap[K, V]) Range(f func(key K, value V) (stop bool))
- func (m *CsMap[K, V]) SetIf(key K, ...)
- func (m *CsMap[K, V]) SetIfAbsent(key K, value V)
- func (m *CsMap[K, V]) SetIfPresent(key K, value V)
- func (m *CsMap[K, V]) Store(key K, value V)
- func (m *CsMap[K, V]) UnmarshalJSON(b []byte) error
- type HashShardPair
- type Tuple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCustomHasher ¶ added in v0.0.3
func WithCustomHasher[K comparable, V any](h func(key K) uint64) func(csMap *CsMap[K, V])
func WithShardCount ¶
func WithShardCount[K comparable, V any](count uint64) func(csMap *CsMap[K, V])
Types ¶
type CsMap ¶
type CsMap[K comparable, V any] struct { // contains filtered or unexported fields }
func (*CsMap[K, V]) MarshalJSON ¶ added in v1.0.8
func (*CsMap[K, V]) Range ¶ added in v0.0.3
Range If the callback function returns true iteration will stop.
func (*CsMap[K, V]) SetIfAbsent ¶ added in v0.0.3
func (m *CsMap[K, V]) SetIfAbsent(key K, value V)
func (*CsMap[K, V]) SetIfPresent ¶ added in v1.0.2
func (m *CsMap[K, V]) SetIfPresent(key K, value V)
func (*CsMap[K, V]) UnmarshalJSON ¶ added in v1.0.8
type HashShardPair ¶ added in v0.0.6
type HashShardPair[K comparable, V any] struct { // contains filtered or unexported fields }
type Tuple ¶ added in v1.0.7
type Tuple[K comparable, V any] struct { Key K Val V }
Click to show internal directories.
Click to hide internal directories.