concurrent

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 (*Map[K, V]) All

func (m *Map[K, V]) All() (all map[K]V)

func (*Map[K, V]) CompareAndDelete

func (m *Map[K, V]) CompareAndDelete(key K, old V) (deleted bool)

func (*Map[K, V]) CompareAndSwap

func (m *Map[K, V]) CompareAndSwap(key K, old, new V) bool

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(key K)

func (*Map[K, V]) Keys

func (m *Map[K, V]) Keys() (keys []K)

func (*Map[K, V]) Load

func (m *Map[K, V]) Load(key K) (value V, ok bool)

func (*Map[K, V]) LoadAndDelete

func (m *Map[K, V]) LoadAndDelete(key K) (value V, loaded bool)

func (*Map[K, V]) LoadOrStore

func (m *Map[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)

func (*Map[K, V]) Range

func (m *Map[K, V]) Range(f func(key K, value V) bool)

func (*Map[K, V]) Store

func (m *Map[K, V]) Store(key K, value V)

func (*Map[K, V]) Swap

func (m *Map[K, V]) Swap(key K, value V) (previous V, loaded bool)

func (*Map[K, V]) Values

func (m *Map[K, V]) Values() (values []V)

type Set

type Set[K comparable] struct {
	// contains filtered or unexported fields
}

func (*Set[K]) Add

func (s *Set[K]) Add(key K) (added bool)

func (*Set[K]) All

func (s *Set[K]) All() (all []K)

func (*Set[K]) Delete

func (s *Set[K]) Delete(key K) bool

func (*Set[K]) Has

func (s *Set[K]) Has(key K) (ok bool)

func (*Set[K]) Len

func (s *Set[K]) Len() int

func (*Set[K]) Range

func (s *Set[K]) Range(f func(key K) bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL