generic

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncMap

type SyncMap[K comparable, V any] struct {
	sync.Map
}

A SyncMap is a concurrency-safe sync.Map that uses strongly-typed method signatures to ensure the types of its stored data are known.

func SyncMapFromMap

func SyncMapFromMap[K comparable, V any](m map[K]V) *SyncMap[K, V]

func (*SyncMap[K, V]) Get

func (m *SyncMap[K, V]) Get(key K) (V, bool)

func (*SyncMap[K, V]) Iter

func (m *SyncMap[K, V]) Iter(ranger func(key K, value V) bool)

func (*SyncMap[K, V]) Keys added in v1.0.4

func (m *SyncMap[K, V]) Keys() []K

func (*SyncMap[K, V]) Put

func (m *SyncMap[K, V]) Put(key K, value V)

func (*SyncMap[K, V]) String added in v0.3.25

func (m *SyncMap[K, V]) String() string

Jump to

Keyboard shortcuts

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