Documentation ¶
Index ¶
Constants ¶
View Source
const (
BlockHeaderSize = 32 // 4 fields * 8 byte fields
)
Variables ¶
View Source
var ( BlockSize uint64 = 4096 // number of bytes in a device block MetadataSize = BlockSize MagicSentence = []byte("I am a torus block device!") MagicLen = len(MagicSentence) )
Functions ¶
Types ¶
type BlockHeader ¶
func (*BlockHeader) Equal ¶
func (b *BlockHeader) Equal(b2 *BlockHeader) bool
func (*BlockHeader) IsNil ¶
func (b *BlockHeader) IsNil() bool
func (*BlockHeader) Marshal ¶
func (b *BlockHeader) Marshal(buf []byte)
func (*BlockHeader) String ¶
func (b *BlockHeader) String() string
func (*BlockHeader) Unmarshal ¶
func (b *BlockHeader) Unmarshal(buf []byte)
type BlockHeaders ¶
type BlockHeaders []*BlockHeader
func NewBlockHeaders ¶
func NewBlockHeaders() BlockHeaders
func (BlockHeaders) Add ¶
func (bs BlockHeaders) Add(b *BlockHeader) error
func (BlockHeaders) Delete ¶
func (bs BlockHeaders) Delete(br torus.BlockRef)
func (BlockHeaders) IsUsed ¶
func (bs BlockHeaders) IsUsed() bool
func (BlockHeaders) Marshal ¶
func (bs BlockHeaders) Marshal(buf []byte) error
func (BlockHeaders) String ¶
func (bs BlockHeaders) String() string
func (BlockHeaders) Unmarshal ¶
func (bs BlockHeaders) Unmarshal(buf []byte) error
Click to show internal directories.
Click to hide internal directories.