Documentation ¶
Index ¶
Constants ¶
View Source
const ( //NumberOfRecordsPerLBAShard is the fixed length of the LBAShards NumberOfRecordsPerLBAShard = 128 // BytesPerShard defines how many bytes each shards requires BytesPerShard = NumberOfRecordsPerLBAShard * zerodisk.HashSize )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LBA ¶
type LBA struct {
// contains filtered or unexported fields
}
LBA implements the functionality to lookup block keys through the logical block index. The data is persisted to an external metadataserver in shards of n keys, where n = NumberOfRecordsPerLBAShard.
func NewLBA ¶
func NewLBA(vdiskID string, blockCount, cacheLimitInBytes int64, provider MetaRedisProvider) (lba *LBA, err error)
NewLBA creates a new LBA
func (*LBA) Delete ¶
Delete the content hash for a specific block. When a key is updated, the shard containing this blockindex is marked as dirty and will be stored in the external metadaserver when Flush is called Deleting means actually that the nilhash will be set for this blockindex.
type MetaRedisProvider ¶
MetaRedisProvider is used by the LBA, to retreive a Redis Meta Connection
Click to show internal directories.
Click to hide internal directories.