Documentation ¶
Index ¶
- type Map
- func (cm Map[K, V]) Compute(k K, f func(V, bool) V) V
- func (cm Map[K, V]) Delete(k K)
- func (cm Map[K, V]) Load(k K) (V, bool)
- func (cm Map[K, V]) LoadAndDelete(k K) (V, bool)
- func (cm Map[K, V]) LoadOrStore(k K, v V) (V, bool)
- func (cm Map[K, V]) Locked(f func(m RWMap[K, V]))
- func (cm Map[K, V]) RLocked(f func(m RMap[K, V]))
- func (cm Map[K, V]) Range(f func(k K, v V) bool)
- func (cm Map[K, V]) Store(k K, v V)
- func (cm Map[K, V]) Swap(k K, v V) (V, bool)
- type RMap
- type RWMap
- type WorkGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func NewMap ¶
func NewMap[K comparable, V any]() Map[K, V]
func (Map[K, V]) LoadAndDelete ¶
func (Map[K, V]) LoadOrStore ¶
type RMap ¶
type RMap[K comparable, V any] interface { Load(k K) (V, bool) Range(f func(k K, v V) bool) RLocked(f func(m RMap[K, V])) }
type WorkGroup ¶
type WorkGroup[In any, Acc any, Out any] struct { Parallelism uint Worker func(ctx context.Context, v In, acc Acc) (Acc, error) Combiner func(ctx context.Context, a, b Acc) (Acc, error) Finisher func(ctx context.Context, acc Acc) (Out, error) }
Click to show internal directories.
Click to hide internal directories.