metadatacache

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func ChunkToEntryNumber(chunk apis.ChunkNum) uint32

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

func EntryNumberToOffset(entryN uint32) uint32

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL