MCPcopy Create free account
hub / github.com/cloud-native-go/examples / Shard

Struct Shard

ch04/sharding.go:25–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23)
24
25type Shard[K comparable, V any] struct {
26 sync.RWMutex // Compose from sync.RWMutex
27 items map[K]V // m contains the shard's data
28}
29
30type ShardedMap[K comparable, V any] []*Shard[K, V]
31

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected