container

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerMagic    = "coldkeep0" // must be exactly 8 bytes
	ContainerHdrLenV0 = 64          // fixed header size in bytes
)
View Source
const (
	FLAG_WHOLE_COMPRESS = 1 << 0
	FLAG_WHOLE_ENCRYPT  = 1 << 1
	FLAG_BLOCK_LAYOUT   = 1 << 2
	FLAG_HAS_BLOCK_TBL  = 1 << 3
)

Reserved future flags (not used yet)

Variables

View Source
var ContainersDir = utils_env.GetenvOrDefault("COLDKEEP_STORAGE_DIR", "./storage/containers")

Functions

func AppendChunkPhysical

func AppendChunkPhysical(filename string, currentSize int64, chunk []byte) (int64, int64, error)

func CheckContainerHashFile added in v0.4.0

func CheckContainerHashFile(id int, filename, storedHash string) error

func GetContainerMaxSize

func GetContainerMaxSize() int64

GetContainerMaxSize returns the current container max size

func GetOrCreateOpenContainer

func GetOrCreateOpenContainer(db db.DBTX) (int64, string, int64, error)

func SealContainer

func SealContainer(tx db.DBTX, containerID int64, filename string) error

func SetContainerMaxSize

func SetContainerMaxSize(size int64)

SetContainerMaxSize sets the container max size (for testing)

func UpdateContainerSize

func UpdateContainerSize(tx db.DBTX, containerID int64, newSize int64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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