Versions in this module Expand all Collapse all v0 v0.1.0 Oct 26, 2026 Changes in this version + var ErrBadMagic = errors.New("pool: bad magic") + var ErrCorrupt = errors.New("pool: corrupt metadata") + var ErrExists = errors.New("pool: name already exists") + var ErrNotFound = errors.New("pool: volume not found") + var ErrPoolFull = errors.New("pool: no free blocks (pool full)") + var ErrReadOnly = errors.New("pool: volume is read-only") + var ErrUnsupportedVersion = errors.New("pool: unsupported version") + type Backing interface + Sync func() error + Truncate func(size int64) error + type Pool struct + func Create(path string, capacityBytes int64) (*Pool, error) + func CreateBlock(path string, capacityBytes, blockSize int64) (*Pool, error) + func CreateWith(b Backing, capacityBytes, blockSize int64) (*Pool, error) + func Open(path string) (*Pool, error) + func OpenWith(b Backing) (*Pool, error) + func (p *Pool) Capacity() (free, total uint32) + func (p *Pool) Clone(src, clone string) (*Volume, error) + func (p *Pool) Close() error + func (p *Pool) CreateVolume(name string, sizeBytes int64) (*Volume, error) + func (p *Pool) ImportRaw(name string, r io.ReaderAt, size int64) (*Volume, error) + func (p *Pool) ImportRawFile(name, path string) (*Volume, error) + func (p *Pool) OpenVolume(name string) (*Volume, error) + func (p *Pool) Snapshot(src, snap string) (*Volume, error) + func (p *Pool) Sync() error + func (p *Pool) Volumes() []string + type Volume struct + func (v *Volume) Close() error + func (v *Volume) ExportRaw(w io.WriterAt) error + func (v *Volume) ExportRawFile(path string) error + func (v *Volume) Name() string + func (v *Volume) ReadAt(b []byte, off int64) (int, error) + func (v *Volume) ReadOnly() bool + func (v *Volume) Size() (int64, error) + func (v *Volume) Sync() error + func (v *Volume) Truncate(size int64) error + func (v *Volume) WriteAt(b []byte, off int64) (int, error)