Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// NumShards controls the number of shards the XidMap is broken into. More
// shards reduces lock contention.
NumShards int
// LRUSize controls the total size of the LRU cache. The LRU is split
// between all shards, so with 4 shards and an LRUSize of 100, each shard
// receives 25 LRU slots.
LRUSize int
}
Options controls the performance characteristics of the XidMap.
type XidMap ¶
type XidMap struct {
// contains filtered or unexported fields
}
XidMap allocates and tracks mappings between Xids and Uids in a threadsafe manner. It's memory friendly because the mapping is stored on disk, but fast because it uses an LRU cache.
func (*XidMap) AllocateUid ¶
AllocateUid gives a single uid without creating an xid to uid mapping.
type ZeroPool ¶ added in v1.0.0
type ZeroPool struct {
// contains filtered or unexported fields
}
func NewZeroPool ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.