package bkmaps
import "github.com/moby/buildkit/util/bkmaps"
Index ¶
Types ¶
type SyncMap ¶
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
SyncMap provides a typed wrapper around sync.Map.
func (*SyncMap[K, V]) Delete ¶
func (m *SyncMap[K, V]) Delete(key K)
Delete removes the value for a key.
func (*SyncMap[K, V]) Load ¶
Load returns the value stored in the map for a key, if any.
func (*SyncMap[K, V]) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise it stores and returns the given value.
func (*SyncMap[K, V]) Range ¶
Range calls fn sequentially for each key and value present in the map.
func (*SyncMap[K, V]) Store ¶
func (m *SyncMap[K, V]) Store(key K, value V)
Store sets the value for a key.
Source Files ¶
- Version
- v0.29.0 (latest)
- Published
- Mar 31, 2026
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 minute ago –
Tools for package owners.