Documentation ¶
Overview ¶
Package nodeidmap implements an optimized version of map for storj.NodeID.
Index ¶
- type Map
- func (m Map[Value]) Add(xs Map[Value], combine func(old, new Value) Value)
- func (m Map[Value]) AsMap() map[storj.NodeID]Value
- func (m Map[Value]) Clear()
- func (m Map[Value]) Clone() Map[Value]
- func (m Map[Value]) Count() (count int)
- func (m Map[Value]) Load(id storj.NodeID) (value Value, ok bool)
- func (m Map[Value]) Modify(id storj.NodeID, modify func(old Value, ok bool) Value)
- func (m Map[Value]) Range(fn func(k storj.NodeID, v Value) bool)
- func (m *Map[Value]) Reset(size int)
- func (m Map[Value]) Store(id storj.NodeID, value Value)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[Value any] struct { // contains filtered or unexported fields }
Map implements a map[storj.NodeID]Value, which avoids hashing the whole node id.
func (Map[Value]) Add ¶
Add adds xs to the receiver, using combine to add values together when those values fall under the same NodeID.
Click to show internal directories.
Click to hide internal directories.