portion

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPortion

type DataPortion struct {
	Start address.Address
	Len   uint16
}

func NewDataPortion

func NewDataPortion(start uint64, size uint16) DataPortion

func (DataPortion) AsInts

func (p DataPortion) AsInts() (offset uint64, size uint16)

func (DataPortion) Display

func (p DataPortion) Display() string

func (DataPortion) End

func (p DataPortion) End() uint64

func (DataPortion) ShiftBlockToBytes

func (p DataPortion) ShiftBlockToBytes(b block.BlockSize) (offset uint64, size uint32)

func (DataPortion) ShiftToPaddingBlock

func (p DataPortion) ShiftToPaddingBlock(b block.BlockSize) (offset uint64)

func (DataPortion) SizeOnDisk

func (p DataPortion) SizeOnDisk(b block.BlockSize) uint32

type EndBasedPortion

type EndBasedPortion FreePortion

func (EndBasedPortion) Less

func (p EndBasedPortion) Less(than btree.Item) bool

type FreePortion

type FreePortion uint64

FreePortion/SizeBasedPortion/EndBasedPortion is used only in BtreeDataPortionAlloc

func FromDataPortion

func FromDataPortion(dataPortion DataPortion) FreePortion

func NewFreePortion

func NewFreePortion(offset address.Address, size uint32) FreePortion

panic

func (FreePortion) CheckedExtend

func (p FreePortion) CheckedExtend(size uint32) (FreePortion, bool)

func (FreePortion) End

func (p FreePortion) End() address.Address

func (FreePortion) Len

func (p FreePortion) Len() uint32

func (FreePortion) SlicePart

func (p FreePortion) SlicePart(size uint16) (FreePortion, DataPortion)

panic

func (FreePortion) Start

func (p FreePortion) Start() address.Address

type JournalPortion

type JournalPortion struct {
	Start address.Address
	Len   uint16
}

func NewJournalPortion

func NewJournalPortion(start uint64, size uint16) JournalPortion

func (JournalPortion) SizeOnDisk

func (jp JournalPortion) SizeOnDisk(b block.BlockSize) uint32

type Portion

type Portion interface {
	SizeOnDisk(block.BlockSize) uint32
}

type SizeBasedPortion

type SizeBasedPortion FreePortion

func (SizeBasedPortion) Less

func (p SizeBasedPortion) Less(than btree.Item) bool

Jump to

Keyboard shortcuts

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