Documentation
¶
Index ¶
- func ChunkToBlockAndOffset(chunk apis.ChunkNum) (apis.MetadataID, uint32)
- func ChunkToBlockID(chunk apis.ChunkNum) apis.MetadataID
- func ChunkToEntryNumber(chunk apis.ChunkNum) uint32
- func EntryAndBlockToChunkNum(metachunk apis.MetadataID, index uint32) apis.ChunkNum
- func EntryNumberToOffset(entryN uint32) uint32
- func NewCache(connCache rpc.ConnectionCache, etcd apis.EtcdInterface) (apis.MetadataCache, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChunkToBlockAndOffset ¶
func ChunkToBlockAndOffset(chunk apis.ChunkNum) (apis.MetadataID, uint32)
Compute the metadata block, and offset within the block, that a certain chunk belongs to
func ChunkToBlockID ¶
func ChunkToBlockID(chunk apis.ChunkNum) apis.MetadataID
Compute which metadata block the chunk belongs to
func ChunkToEntryNumber ¶
Compute the index within its metadata block where a chunk should be able to be found
func EntryAndBlockToChunkNum ¶
func EntryAndBlockToChunkNum(metachunk apis.MetadataID, index uint32) apis.ChunkNum
func EntryNumberToOffset ¶
Calculate the offset of the metadata entry inside of the block in bytes
func NewCache ¶
func NewCache(connCache rpc.ConnectionCache, etcd apis.EtcdInterface) (apis.MetadataCache, error)
Construct a new metadata cache.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.