Documentation ¶
Index ¶
- Constants
- func Barrier()deprecated
- func Init(d Disk)
- func Size() uint64deprecated
- func Write(a uint64, v Block)deprecated
- type Block
- func Read(a uint64) Blockdeprecated
- type Disk
- type FileDisk
- type MemDisk
Constants ¶
View Source
const BlockSize uint64 = 4096
Variables ¶
This section is empty.
Functions ¶
func Barrier
deprecated
func Barrier()
Barrier (see the Disk documentation)
Deprecated: use Get() and the Disk method
Types ¶
type Disk ¶
type Disk interface { // Read reads a disk block by address // // Expects a < Size(). Read(a uint64) Block // ReadTo reads the disk block at a and stores the result in b // // Expects a < Size(). ReadTo(a uint64, b Block) // Write updates a disk block by address // // Expects a < Size(). Write(a uint64, v Block) // Size reports how big the disk is, in blocks Size() uint64 // Barrier ensures data is persisted. // // When it returns, all outstanding writes are guaranteed to be durably on // disk Barrier() // Close releases any resources used by the disk and makes it unusable. Close() }
Disk provides access to a logical block-based disk
Click to show internal directories.
Click to hide internal directories.