Documentation
¶
Index ¶
- Constants
- Variables
- func AppendChunkPhysical(filename string, currentSize int64, chunk []byte) (int64, int64, error)
- func CheckContainerHashFile(id int, filename, storedHash string) error
- func GetContainerMaxSize() int64
- func GetOrCreateOpenContainer(db db.DBTX) (int64, string, int64, error)
- func SealContainer(tx db.DBTX, containerID int64, filename string) error
- func SetContainerMaxSize(size int64)
- func UpdateContainerSize(tx db.DBTX, containerID int64, newSize int64) error
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 CheckContainerHashFile ¶ added in v0.4.0
func GetContainerMaxSize ¶
func GetContainerMaxSize() int64
GetContainerMaxSize returns the current container max size
func SetContainerMaxSize ¶
func SetContainerMaxSize(size int64)
SetContainerMaxSize sets the container max size (for testing)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.