lib

package module
v0.0.0-...-c4f131e Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const E2BIG = 7 /* Arg list too long */
View Source
const EACCES = 13 /* Permission denied */
View Source
const EAGAIN = 11 /* No more processes */
View Source
const EBADF = 9 /* Bad file number */
View Source
const EBUSY = 16 /* Mount device busy */
View Source
const ECHILD = 10 /* No children */
View Source
const EDOM = 33 /* Math arg out of domain of func */
View Source
const EEXIST = 17 /* File exists */
View Source
const EFAULT = 14 /* Bad address */
View Source
const EFBIG = 27 /* File too large */
View Source
const EINTR = 4 /* Interrupted system call */
View Source
const EINVAL = 22 /* Invalid argument */
View Source
const EIO = 5 /* I/O error */
View Source
const EISDIR = 21 /* Is a directory */
View Source
const EMFILE = 24 /* Too many open files */
View Source
const EMLINK = 31 /* Too many links */
View Source
const ENFILE = 23 /* Too many open files in system */
View Source
const ENODEV = 19 /* No such device */
View Source
const ENOENT = 2 /* No such file or directory */
View Source
const ENOEXEC = 8 /* Exec format error */
View Source
const ENOMEM = 12 /* Not enough core */
View Source
const ENOSPC = 28 /* No space left on device */
View Source
const ENOTBLK = 15 /* Block device required */
View Source
const ENOTDIR = 20 /* Not a directory */
View Source
const ENOTTY = 25 /* Not a typewriter */
View Source
const ENXIO = 6 /* No such device or address */
View Source
const EPERM = 1 /* Not super-user */
View Source
const EPIPE = 32 /* Broken pipe */
View Source
const ERANGE = 34 /* Math result not representable */
View Source
const EROFS = 30 /* Read only file system */
View Source
const ESPIPE = 29 /* Illegal seek */
View Source
const ESRCH = 3 /* No such process */
View Source
const ETXTBSY = 26 /* Text file busy */
View Source
const EXDEV = 18 /* Cross-device link */

Variables

This section is empty.

Functions

func AssertProxy_Assert

func AssertProxy_Assert(expression *C.char, file *C.char, line C.int)

func AsyncGetIndexAPIProxy_Dispose

func AsyncGetIndexAPIProxy_Dispose(api *C.struct_Longtail_API)

func AsyncGetIndexAPIProxy_OnComplete

func AsyncGetIndexAPIProxy_OnComplete(async_complete_api *C.struct_Longtail_AsyncGetIndexAPI, content_index *C.struct_Longtail_ContentIndex, err C.int) C.int

func AsyncGetStoredBlockAPIProxy_Dispose

func AsyncGetStoredBlockAPIProxy_Dispose(api *C.struct_Longtail_API)

func AsyncGetStoredBlockAPIProxy_OnComplete

func AsyncGetStoredBlockAPIProxy_OnComplete(async_complete_api *C.struct_Longtail_AsyncGetStoredBlockAPI, stored_block *C.struct_Longtail_StoredBlock, err C.int) C.int

func AsyncPutStoredBlockAPIProxy_Dispose

func AsyncPutStoredBlockAPIProxy_Dispose(api *C.struct_Longtail_API)

func AsyncPutStoredBlockAPIProxy_OnComplete

func AsyncPutStoredBlockAPIProxy_OnComplete(async_complete_api *C.struct_Longtail_AsyncPutStoredBlockAPI, err C.int) C.int

func BlockStoreAPIProxy_Dispose

func BlockStoreAPIProxy_Dispose(api *C.struct_Longtail_API)

func BlockStoreAPIProxy_GetIndex

func BlockStoreAPIProxy_GetIndex(api *C.struct_Longtail_BlockStoreAPI, defaultHashApiIdentifier uint32, async_complete_api *C.struct_Longtail_AsyncGetIndexAPI) C.int

func BlockStoreAPIProxy_GetStats

func BlockStoreAPIProxy_GetStats(api *C.struct_Longtail_BlockStoreAPI, out_stats *C.struct_Longtail_BlockStore_Stats) C.int

func BlockStoreAPIProxy_GetStoredBlock

func BlockStoreAPIProxy_GetStoredBlock(api *C.struct_Longtail_BlockStoreAPI, blockHash C.uint64_t, async_complete_api *C.struct_Longtail_AsyncGetStoredBlockAPI) C.int

func BlockStoreAPIProxy_PutStoredBlock

func BlockStoreAPIProxy_PutStoredBlock(api *C.struct_Longtail_BlockStoreAPI, storedBlock *C.struct_Longtail_StoredBlock, async_complete_api *C.struct_Longtail_AsyncPutStoredBlockAPI) C.int

func ChangeVersion

func ChangeVersion(
	contentBlockStoreAPI Longtail_BlockStoreAPI,
	versionStorageAPI Longtail_StorageAPI,
	hashAPI Longtail_HashAPI,
	jobAPI Longtail_JobAPI,
	progressAPI *Longtail_ProgressAPI,
	contentIndex Longtail_ContentIndex,
	sourceVersionIndex Longtail_VersionIndex,
	targetVersionIndex Longtail_VersionIndex,
	versionDiff Longtail_VersionDiff,
	versionFolderPath string,
	retainPermissions bool) error

ChangeVersion ...

func GetBlake2HashIdentifier

func GetBlake2HashIdentifier() uint32

GetBlake2HashIdentifier() ...

func GetBlake3HashIdentifier

func GetBlake3HashIdentifier() uint32

GetBlake3HashIdentifier() ...

func GetBrotliGenericDefaultCompressionType

func GetBrotliGenericDefaultCompressionType() uint32

GetBrotliGenericDefaultCompressionType ...

func GetBrotliGenericMaxCompressionType

func GetBrotliGenericMaxCompressionType() uint32

GetBrotliGenericMaxCompressionType ...

func GetBrotliGenericMinCompressionType

func GetBrotliGenericMinCompressionType() uint32

GetBrotliGenericMinCompressionType ...

func GetBrotliTextDefaultCompressionType

func GetBrotliTextDefaultCompressionType() uint32

GetBrotliTextDefaultCompressionType ...

func GetBrotliTextMaxCompressionType

func GetBrotliTextMaxCompressionType() uint32

GetBrotliTextMaxCompressionType ...

func GetBrotliTextMinCompressionType

func GetBrotliTextMinCompressionType() uint32

GetBrotliTextMinCompressionType ...

func GetLZ4DefaultCompressionType

func GetLZ4DefaultCompressionType() uint32

GetLZ4DefaultCompressionType ...

func GetMeowHashIdentifier

func GetMeowHashIdentifier() uint32

GetMeowHashIdentifier() ...

func GetNoCompressionType

func GetNoCompressionType() uint32

GetNoCompressionType ...

func GetZStdDefaultCompressionType

func GetZStdDefaultCompressionType() uint32

GetZStdDefaultCompressionType ...

func GetZStdMaxCompressionType

func GetZStdMaxCompressionType() uint32

GetZStdMaxCompressionType ...

func GetZStdMinCompressionType

func GetZStdMinCompressionType() uint32

GetZStdMinCompressionType ...

func LogProxy_Log

func LogProxy_Log(context unsafe.Pointer, level C.int, log *C.char)

func LongtailAlloc

func LongtailAlloc(size uint64) unsafe.Pointer

LongtailAlloc ...

func LongtailFree

func LongtailFree(data unsafe.Pointer)

LongtailFree ...

func ProgressAPIProxy_Dispose

func ProgressAPIProxy_Dispose(api *C.struct_Longtail_API)

func ProgressAPIProxy_OnProgress

func ProgressAPIProxy_OnProgress(progress_api *C.struct_Longtail_ProgressAPI, total_count C.uint32_t, done_count C.uint32_t)

func RestorePointer

func RestorePointer(ptr unsafe.Pointer) (v interface{})

func SavePointer

func SavePointer(v interface{}) unsafe.Pointer

func SetAssert

func SetAssert(assert Assert)

SetAssert ...

func SetLogLevel

func SetLogLevel(level int)

SetLogLevel ...

func SetLogger

func SetLogger(logger Logger)

SetLogger ...

func UnrefPointer

func UnrefPointer(ptr unsafe.Pointer)

func WriteBlockIndexToBuffer

func WriteBlockIndexToBuffer(index Longtail_BlockIndex) ([]byte, error)

WriteBlockIndexToBuffer ...

func WriteContent

func WriteContent(
	sourceStorageAPI Longtail_StorageAPI,
	targetBlockStoreAPI Longtail_BlockStoreAPI,
	jobAPI Longtail_JobAPI,
	progressAPI *Longtail_ProgressAPI,
	block_store_content_index Longtail_ContentIndex,
	versionContentIndex Longtail_ContentIndex,
	versionIndex Longtail_VersionIndex,
	versionFolderPath string) error

WriteContent ...

func WriteContentIndex

func WriteContentIndex(storageAPI Longtail_StorageAPI, index Longtail_ContentIndex, path string) error

WriteContentIndex ...

func WriteContentIndexToBuffer

func WriteContentIndexToBuffer(index Longtail_ContentIndex) ([]byte, error)

WriteContentIndexToBuffer ...

func WriteStoredBlockToBuffer

func WriteStoredBlockToBuffer(storedBlock Longtail_StoredBlock) ([]byte, error)

func WriteVersion

func WriteVersion(
	contentBlockStoreAPI Longtail_BlockStoreAPI,
	versionStorageAPI Longtail_StorageAPI,
	jobAPI Longtail_JobAPI,
	progressAPI *Longtail_ProgressAPI,
	contentIndex Longtail_ContentIndex,
	versionIndex Longtail_VersionIndex,
	versionFolderPath string,
	retainPermissions bool) error

WriteVersion ...

func WriteVersionIndex

func WriteVersionIndex(storageAPI Longtail_StorageAPI, index Longtail_VersionIndex, path string) error

WriteVersionIndex ...

func WriteVersionIndexToBuffer

func WriteVersionIndexToBuffer(index Longtail_VersionIndex) ([]byte, error)

WriteVersionIndexToBuffer ...

Types

type Assert

type Assert interface {
	OnAssert(expression string, file string, line int)
}

type AsyncGetIndexAPI

type AsyncGetIndexAPI interface {
	OnComplete(content_index Longtail_ContentIndex, err int) int
}

type AsyncGetStoredBlockAPI

type AsyncGetStoredBlockAPI interface {
	OnComplete(stored_block Longtail_StoredBlock, err int) int
}

type AsyncPutStoredBlockAPI

type AsyncPutStoredBlockAPI interface {
	OnComplete(err int) int
}

type BlockStoreAPI

type BlockStoreAPI interface {
	PutStoredBlock(storedBlock Longtail_StoredBlock, asyncCompleteAPI Longtail_AsyncPutStoredBlockAPI) int
	GetStoredBlock(blockHash uint64, asyncCompleteAPI Longtail_AsyncGetStoredBlockAPI) int
	GetIndex(defaultHashAPIIdentifier uint32, asyncCompleteAPI Longtail_AsyncGetIndexAPI) int
	GetStats() (BlockStoreStats, int)
	Close()
}

type BlockStoreStats

type BlockStoreStats struct {
	IndexGetCount      uint64
	BlocksGetCount     uint64
	BlocksPutCount     uint64
	ChunksGetCount     uint64
	ChunksPutCount     uint64
	BytesGetCount      uint64
	BytesPutCount      uint64
	IndexGetRetryCount uint64
	BlockGetRetryCount uint64
	BlockPutRetryCount uint64
	IndexGetFailCount  uint64
	BlockGetFailCount  uint64
	BlockPutFailCount  uint64
}

type Logger

type Logger interface {
	OnLog(level int, log string)
}

type Longtail_AsyncGetIndexAPI

type Longtail_AsyncGetIndexAPI struct {
	// contains filtered or unexported fields
}

func CreateAsyncGetIndexAPI

func CreateAsyncGetIndexAPI(asyncComplete AsyncGetIndexAPI) Longtail_AsyncGetIndexAPI

CreateAsyncGetIndexAPI ...

func (*Longtail_AsyncGetIndexAPI) OnComplete

func (asyncCompleteAPI *Longtail_AsyncGetIndexAPI) OnComplete(content_index Longtail_ContentIndex, errno int) int

// Longtail_AsyncGetIndexAPI::OnComplete() ...

type Longtail_AsyncGetStoredBlockAPI

type Longtail_AsyncGetStoredBlockAPI struct {
	// contains filtered or unexported fields
}

func CreateAsyncGetStoredBlockAPI

func CreateAsyncGetStoredBlockAPI(asyncComplete AsyncGetStoredBlockAPI) Longtail_AsyncGetStoredBlockAPI

CreateAsyncGetStoredBlockAPI ...

func (*Longtail_AsyncGetStoredBlockAPI) OnComplete

func (asyncCompleteAPI *Longtail_AsyncGetStoredBlockAPI) OnComplete(stored_block Longtail_StoredBlock, errno int) int

// Longtail_AsyncGetStoredBlockAPI::OnComplete() ...

type Longtail_AsyncPutStoredBlockAPI

type Longtail_AsyncPutStoredBlockAPI struct {
	// contains filtered or unexported fields
}

func CreateAsyncPutStoredBlockAPI

func CreateAsyncPutStoredBlockAPI(asyncComplete AsyncPutStoredBlockAPI) Longtail_AsyncPutStoredBlockAPI

CreateAsyncPutStoredBlockAPI ...

func (*Longtail_AsyncPutStoredBlockAPI) OnComplete

func (asyncCompleteAPI *Longtail_AsyncPutStoredBlockAPI) OnComplete(errno int) int

// Longtail_AsyncPutStoredBlockAPI::OnComplete() ...

type Longtail_BlockIndex

type Longtail_BlockIndex struct {
	// contains filtered or unexported fields
}

func ReadBlockIndexFromBuffer

func ReadBlockIndexFromBuffer(buffer []byte) (Longtail_BlockIndex, error)

ReadBlockIndexFromBuffer ...

func (*Longtail_BlockIndex) Dispose

func (blockIndex *Longtail_BlockIndex) Dispose()

func (*Longtail_BlockIndex) GetBlockHash

func (blockIndex *Longtail_BlockIndex) GetBlockHash() uint64

func (*Longtail_BlockIndex) GetChunkCount

func (blockIndex *Longtail_BlockIndex) GetChunkCount() uint32

func (*Longtail_BlockIndex) GetChunkHashes

func (blockIndex *Longtail_BlockIndex) GetChunkHashes() []uint64

func (*Longtail_BlockIndex) GetChunkSizes

func (blockIndex *Longtail_BlockIndex) GetChunkSizes() []uint32

func (*Longtail_BlockIndex) GetTag

func (blockIndex *Longtail_BlockIndex) GetTag() uint32

type Longtail_BlockStoreAPI

type Longtail_BlockStoreAPI struct {
	// contains filtered or unexported fields
}

func CreateBlockStoreAPI

func CreateBlockStoreAPI(blockStore BlockStoreAPI) Longtail_BlockStoreAPI

func CreateCacheBlockStore

func CreateCacheBlockStore(cacheBlockStore Longtail_BlockStoreAPI, persistentBlockStore Longtail_BlockStoreAPI) Longtail_BlockStoreAPI

CreateCacheBlockStore() ...

func CreateCompressBlockStore

func CreateCompressBlockStore(backingBlockStore Longtail_BlockStoreAPI, compressionRegistry Longtail_CompressionRegistryAPI) Longtail_BlockStoreAPI

CreateCompressBlockStore() ...

func CreateFSBlockStore

func CreateFSBlockStore(storageAPI Longtail_StorageAPI, contentPath string) Longtail_BlockStoreAPI

CreateFSBlockStore() ...

func CreateFSBlockStoreAPI

func CreateFSBlockStoreAPI(storageAPI Longtail_StorageAPI, contentPath string) Longtail_BlockStoreAPI

func (*Longtail_BlockStoreAPI) Dispose

func (blockStoreAPI *Longtail_BlockStoreAPI) Dispose()

Longtail_BlockStoreAPI.Dispose() ...

func (*Longtail_BlockStoreAPI) GetIndex

func (blockStoreAPI *Longtail_BlockStoreAPI) GetIndex(
	defaultHashAPIIdentifier uint32,
	asyncCompleteAPI Longtail_AsyncGetIndexAPI) int

GetIndex() ...

func (*Longtail_BlockStoreAPI) GetStats

func (blockStoreAPI *Longtail_BlockStoreAPI) GetStats() (BlockStoreStats, int)

GetStats() ...

func (*Longtail_BlockStoreAPI) GetStoredBlock

func (blockStoreAPI *Longtail_BlockStoreAPI) GetStoredBlock(
	blockHash uint64,
	asyncCompleteAPI Longtail_AsyncGetStoredBlockAPI) int

GetStoredBlock() ...

func (*Longtail_BlockStoreAPI) PutStoredBlock

func (blockStoreAPI *Longtail_BlockStoreAPI) PutStoredBlock(
	storedBlock Longtail_StoredBlock,
	asyncCompleteAPI Longtail_AsyncPutStoredBlockAPI) int

// PutStoredBlock() ...

type Longtail_CompressionAPI

type Longtail_CompressionAPI struct {
	// contains filtered or unexported fields
}

func CreateBrotliCompressionAPI

func CreateBrotliCompressionAPI() Longtail_CompressionAPI

CreateBrotliCompressionAPI ...

func CreateLZ4CompressionAPI

func CreateLZ4CompressionAPI() Longtail_CompressionAPI

CreateLZ4CompressionAPI ...

func CreateZStdCompressionAPI

func CreateZStdCompressionAPI() Longtail_CompressionAPI

CreateZStdCompressionAPI ...

func (*Longtail_CompressionAPI) Dispose

func (compressionAPI *Longtail_CompressionAPI) Dispose()

Longtail_CompressionAPI.Dispose() ...

type Longtail_CompressionRegistryAPI

type Longtail_CompressionRegistryAPI struct {
	// contains filtered or unexported fields
}

func CreateFullCompressionRegistry

func CreateFullCompressionRegistry() Longtail_CompressionRegistryAPI

CreateFullCompressionRegistry ...

func (*Longtail_CompressionRegistryAPI) Dispose

func (compressionRegistry *Longtail_CompressionRegistryAPI) Dispose()

Longtail_CompressionRegistryAPI ...

type Longtail_ContentIndex

type Longtail_ContentIndex struct {
	// contains filtered or unexported fields
}

func CreateContentIndex

func CreateContentIndex(
	hashAPI Longtail_HashAPI,
	chunkHashes []uint64,
	chunkSizes []uint32,
	compressionTypes []uint32,
	maxBlockSize uint32,
	maxChunksPerBlock uint32) (Longtail_ContentIndex, error)

CreateContentIndex ...

func CreateContentIndexFromBlocks

func CreateContentIndexFromBlocks(
	hashIdentifier uint32,
	maxBlockSize uint32,
	maxChunksPerBlock uint32,
	blockIndexes []Longtail_BlockIndex) (Longtail_ContentIndex, error)

func CreateMissingContent

func CreateMissingContent(
	hashAPI Longtail_HashAPI,
	contentIndex Longtail_ContentIndex,
	versionIndex Longtail_VersionIndex,
	maxBlockSize uint32,
	maxChunksPerBlock uint32) (Longtail_ContentIndex, error)

CreateMissingContent ...

func MergeContentIndex

func MergeContentIndex(
	localContentIndex Longtail_ContentIndex,
	remoteContentIndex Longtail_ContentIndex) (Longtail_ContentIndex, error)

MergeContentIndex ...

func ReadContentIndex

func ReadContentIndex(storageAPI Longtail_StorageAPI, path string) (Longtail_ContentIndex, error)

ReadContentIndex ...

func ReadContentIndexFromBuffer

func ReadContentIndexFromBuffer(buffer []byte) (Longtail_ContentIndex, error)

ReadContentIndexFromBuffer ...

func RetargetContent

func RetargetContent(
	referenceContentIndex Longtail_ContentIndex,
	contentIndex Longtail_ContentIndex) (Longtail_ContentIndex, error)

RetargetContent ...

func (*Longtail_ContentIndex) Dispose

func (contentIndex *Longtail_ContentIndex) Dispose()

func (*Longtail_ContentIndex) GetBlockCount

func (contentIndex *Longtail_ContentIndex) GetBlockCount() uint64

func (*Longtail_ContentIndex) GetBlockHashes

func (contentIndex *Longtail_ContentIndex) GetBlockHashes() []uint64

func (*Longtail_ContentIndex) GetChunkCount

func (contentIndex *Longtail_ContentIndex) GetChunkCount() uint64

func (*Longtail_ContentIndex) GetHashAPI

func (contentIndex *Longtail_ContentIndex) GetHashAPI() uint32

func (*Longtail_ContentIndex) GetMaxBlockSize

func (contentIndex *Longtail_ContentIndex) GetMaxBlockSize() uint32

func (*Longtail_ContentIndex) GetMaxChunksPerBlock

func (contentIndex *Longtail_ContentIndex) GetMaxChunksPerBlock() uint32

func (*Longtail_ContentIndex) GetVersion

func (contentIndex *Longtail_ContentIndex) GetVersion() uint32

func (*Longtail_ContentIndex) IsValid

func (contentIndex *Longtail_ContentIndex) IsValid() bool

type Longtail_FileInfos

type Longtail_FileInfos struct {
	// contains filtered or unexported fields
}

func GetFilesRecursively

func GetFilesRecursively(storageAPI Longtail_StorageAPI, rootPath string) (Longtail_FileInfos, error)

GetFilesRecursively ...

func (*Longtail_FileInfos) Dispose

func (fileInfos *Longtail_FileInfos) Dispose()

func (*Longtail_FileInfos) GetFileCount

func (fileInfos *Longtail_FileInfos) GetFileCount() uint32

func (*Longtail_FileInfos) GetFilePermissions

func (fileInfos *Longtail_FileInfos) GetFilePermissions() []uint32

func (*Longtail_FileInfos) GetFileSizes

func (fileInfos *Longtail_FileInfos) GetFileSizes() []uint64

func (*Longtail_FileInfos) GetPaths

func (fileInfos *Longtail_FileInfos) GetPaths() Longtail_Paths

type Longtail_HashAPI

type Longtail_HashAPI struct {
	// contains filtered or unexported fields
}

func CreateBlake2HashAPI

func CreateBlake2HashAPI() Longtail_HashAPI

CreateBlake2HashAPI ...

func CreateBlake3HashAPI

func CreateBlake3HashAPI() Longtail_HashAPI

CreateBlake3HashAPI ...

func CreateMeowHashAPI

func CreateMeowHashAPI() Longtail_HashAPI

CreateMeowHashAPI ...

func (*Longtail_HashAPI) Dispose

func (hashAPI *Longtail_HashAPI) Dispose()

Longtail_HashAPI.Dispose() ...

func (*Longtail_HashAPI) GetIdentifier

func (hashAPI *Longtail_HashAPI) GetIdentifier() uint32

type Longtail_JobAPI

type Longtail_JobAPI struct {
	// contains filtered or unexported fields
}

func CreateBikeshedJobAPI

func CreateBikeshedJobAPI(workerCount uint32) Longtail_JobAPI

CreateBikeshedJobAPI ...

func (*Longtail_JobAPI) Dispose

func (jobAPI *Longtail_JobAPI) Dispose()

Longtail_JobAPI.Dispose() ...

type Longtail_Paths

type Longtail_Paths struct {
	// contains filtered or unexported fields
}

func (*Longtail_Paths) Dispose

func (paths *Longtail_Paths) Dispose()

func (Longtail_Paths) GetPath

func (paths Longtail_Paths) GetPath(index uint32) string

GetPath ...

func (*Longtail_Paths) GetPathCount

func (paths *Longtail_Paths) GetPathCount() uint32

type Longtail_ProgressAPI

type Longtail_ProgressAPI struct {
	// contains filtered or unexported fields
}

func CreateProgressAPI

func CreateProgressAPI(progress ProgressAPI) Longtail_ProgressAPI

CreateProgressAPI ...

func (*Longtail_ProgressAPI) Dispose

func (progressAPI *Longtail_ProgressAPI) Dispose()

Longtail_ProgressAPI.Dispose() ...

type Longtail_StorageAPI

type Longtail_StorageAPI struct {
	// contains filtered or unexported fields
}

func CreateFSStorageAPI

func CreateFSStorageAPI() Longtail_StorageAPI

CreateFSStorageAPI ...

func CreateInMemStorageAPI

func CreateInMemStorageAPI() Longtail_StorageAPI

CreateInMemStorageAPI ...

func (*Longtail_StorageAPI) Dispose

func (storageAPI *Longtail_StorageAPI) Dispose()

Longtail_StorageAPI.Dispose() ...

func (*Longtail_StorageAPI) ReadFromStorage

func (storageAPI *Longtail_StorageAPI) ReadFromStorage(rootPath string, path string) ([]byte, error)

ReadFromStorage ...

func (*Longtail_StorageAPI) WriteToStorage

func (storageAPI *Longtail_StorageAPI) WriteToStorage(rootPath string, path string, blockData []byte) error

WriteToStorage ...

type Longtail_StoredBlock

type Longtail_StoredBlock struct {
	// contains filtered or unexported fields
}

func CreateStoredBlock

func CreateStoredBlock(
	blockHash uint64,
	compressionType uint32,
	chunkHashes []uint64,
	chunkSizes []uint32,
	blockData []uint8,
	blockDataIncludesIndex bool) (Longtail_StoredBlock, int)

CreateStoredBlock() ...

func ReadStoredBlockFromBuffer

func ReadStoredBlockFromBuffer(buffer []byte) (Longtail_StoredBlock, error)

func (*Longtail_StoredBlock) Dispose

func (storedBlock *Longtail_StoredBlock) Dispose()

func (*Longtail_StoredBlock) GetBlockIndex

func (storedBlock *Longtail_StoredBlock) GetBlockIndex() Longtail_BlockIndex

func (*Longtail_StoredBlock) GetChunksBlockData

func (storedBlock *Longtail_StoredBlock) GetChunksBlockData() []byte

type Longtail_VersionDiff

type Longtail_VersionDiff struct {
	// contains filtered or unexported fields
}

func CreateVersionDiff

func CreateVersionDiff(
	sourceVersionIndex Longtail_VersionIndex,
	targetVersionIndex Longtail_VersionIndex) (Longtail_VersionDiff, error)

CreateVersionDiff do we really need this? Maybe ChangeVersion should create one on the fly?

func (*Longtail_VersionDiff) Dispose

func (versionDiff *Longtail_VersionDiff) Dispose()

type Longtail_VersionIndex

type Longtail_VersionIndex struct {
	// contains filtered or unexported fields
}

func CreateVersionIndex

func CreateVersionIndex(
	storageAPI Longtail_StorageAPI,
	hashAPI Longtail_HashAPI,
	jobAPI Longtail_JobAPI,
	progressAPI *Longtail_ProgressAPI,
	rootPath string,
	paths Longtail_Paths,
	assetSizes []uint64,
	assetPermissions []uint32,
	assetCompressionTypes []uint32,
	maxChunkSize uint32) (Longtail_VersionIndex, error)

CreateVersionIndex ...

func ReadVersionIndex

func ReadVersionIndex(storageAPI Longtail_StorageAPI, path string) (Longtail_VersionIndex, error)

ReadVersionIndex ...

func ReadVersionIndexFromBuffer

func ReadVersionIndexFromBuffer(buffer []byte) (Longtail_VersionIndex, error)

ReadVersionIndexFromBuffer ...

func (*Longtail_VersionIndex) Dispose

func (versionIndex *Longtail_VersionIndex) Dispose()

func (*Longtail_VersionIndex) GetAssetCount

func (versionIndex *Longtail_VersionIndex) GetAssetCount() uint32

func (*Longtail_VersionIndex) GetChunkCount

func (versionIndex *Longtail_VersionIndex) GetChunkCount() uint32

func (*Longtail_VersionIndex) GetChunkHashes

func (versionIndex *Longtail_VersionIndex) GetChunkHashes() []uint64

func (*Longtail_VersionIndex) GetChunkSizes

func (versionIndex *Longtail_VersionIndex) GetChunkSizes() []uint32

func (*Longtail_VersionIndex) GetChunkTags

func (versionIndex *Longtail_VersionIndex) GetChunkTags() []uint32

func (*Longtail_VersionIndex) GetHashAPI

func (versionIndex *Longtail_VersionIndex) GetHashAPI() uint32

func (*Longtail_VersionIndex) GetTargetChunkSize

func (versionIndex *Longtail_VersionIndex) GetTargetChunkSize() uint32

func (*Longtail_VersionIndex) GetVersion

func (versionIndex *Longtail_VersionIndex) GetVersion() uint32

type ProgressAPI

type ProgressAPI interface {
	OnProgress(totalCount uint32, doneCount uint32)
}

Jump to

Keyboard shortcuts

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