Documentation
¶
Index ¶
- Constants
- Variables
- func Open(path string) (*File, []byte, Meta, error)
- func OpenBlobs(path string) (*File, []Blob, Meta, error)
- func OpenBlobsWithOptions(path string, options OpenOptions) (*File, []Blob, Meta, OpenReport, error)
- func OpenBlobsWithReport(path string) (*File, []Blob, Meta, OpenReport, error)
- type Blob
- type BlobClass
- type File
- type Meta
- type OpenOptions
- type OpenReport
- type RecordID
- type RecordPage
- func DecodeIndexPage(page []byte, expectedPageID uint64) (*RecordPage, error)
- func DecodeRecordPage(page []byte, expectedPageID uint64) (*RecordPage, error)
- func NewIndexPageAt(pageID, generation, lsn uint64) *RecordPage
- func NewRecordPage(pageID uint64) *RecordPage
- func NewRecordPageAt(pageID, generation, lsn uint64) *RecordPage
- func (p *RecordPage) Delete(id RecordID) error
- func (p *RecordPage) FreeBytes() int
- func (p *RecordPage) Generation() uint64
- func (p *RecordPage) Get(id RecordID) ([]byte, error)
- func (p *RecordPage) Insert(record []byte) (RecordID, error)
- func (p *RecordPage) LSN() uint64
- func (p *RecordPage) MarshalBinary() ([]byte, error)
- func (p *RecordPage) PageID() uint64
- func (p *RecordPage) Update(id RecordID, record []byte) error
Constants ¶
View Source
const (
PageSize = 16 * 1024
)
Variables ¶
Functions ¶
func OpenBlobsWithOptions ¶
func OpenBlobsWithOptions(path string, options OpenOptions) (*File, []Blob, Meta, OpenReport, error)
func OpenBlobsWithReport ¶
Types ¶
type OpenOptions ¶
type OpenOptions struct{ RequireClean bool }
type OpenReport ¶
type OpenReport struct {
Created bool
SelectedMetaSlot uint8
ValidMetaSlots uint8
MetaRedundancyDegraded bool
TrailingBytesRemoved uint64
FreePageReuseDegraded bool
}
OpenReport records bounded recovery actions performed by OpenBlobsWithReport. It deliberately excludes paths and snapshot contents.
type RecordID ¶
RecordID never aliases a reused slot: deleting a record advances the slot's generation before that slot can be allocated again.
type RecordPage ¶
type RecordPage struct {
// contains filtered or unexported fields
}
RecordPage is a slotted 16 KiB document page. Its binary form packs record bodies from the header upward and the fixed-size slot directory downward.
func DecodeIndexPage ¶
func DecodeIndexPage(page []byte, expectedPageID uint64) (*RecordPage, error)
func DecodeRecordPage ¶
func DecodeRecordPage(page []byte, expectedPageID uint64) (*RecordPage, error)
func NewIndexPageAt ¶
func NewIndexPageAt(pageID, generation, lsn uint64) *RecordPage
func NewRecordPage ¶
func NewRecordPage(pageID uint64) *RecordPage
func NewRecordPageAt ¶
func NewRecordPageAt(pageID, generation, lsn uint64) *RecordPage
func (*RecordPage) Delete ¶
func (p *RecordPage) Delete(id RecordID) error
func (*RecordPage) FreeBytes ¶
func (p *RecordPage) FreeBytes() int
func (*RecordPage) Generation ¶
func (p *RecordPage) Generation() uint64
func (*RecordPage) LSN ¶
func (p *RecordPage) LSN() uint64
func (*RecordPage) MarshalBinary ¶
func (p *RecordPage) MarshalBinary() ([]byte, error)
func (*RecordPage) PageID ¶
func (p *RecordPage) PageID() uint64
Click to show internal directories.
Click to hide internal directories.