Versions in this module Expand all Collapse all v0 v0.0.22 May 4, 2020 v0.0.21 Apr 29, 2020 Changes in this version + const E2BIG + const EACCES + const EAGAIN + const EBADF + const EBUSY + const ECHILD + const EDOM + const EEXIST + const EFAULT + const EFBIG + const EINTR + const EINVAL + const EIO + const EISDIR + const EMFILE + const EMLINK + const ENFILE + const ENODEV + const ENOENT + const ENOEXEC + const ENOMEM + const ENOSPC + const ENOTBLK + const ENOTDIR + const ENOTTY + const ENXIO + const EPERM + const EPIPE + const ERANGE + const EROFS + const ESPIPE + const ESRCH + const ETXTBSY + const EXDEV + func AssertProxy_Assert(expression *C.char, file *C.char, line C.int) + func AsyncGetIndexAPIProxy_Dispose(api *C.struct_Longtail_API) + func AsyncGetIndexAPIProxy_OnComplete(async_complete_api *C.struct_Longtail_AsyncGetIndexAPI, ...) + func AsyncGetStoredBlockAPIProxy_Dispose(api *C.struct_Longtail_API) + func AsyncGetStoredBlockAPIProxy_OnComplete(async_complete_api *C.struct_Longtail_AsyncGetStoredBlockAPI, ...) + func AsyncPutStoredBlockAPIProxy_Dispose(api *C.struct_Longtail_API) + func AsyncPutStoredBlockAPIProxy_OnComplete(async_complete_api *C.struct_Longtail_AsyncPutStoredBlockAPI, err C.int) + func BlockStoreAPIProxy_Dispose(api *C.struct_Longtail_API) + func BlockStoreAPIProxy_GetIndex(api *C.struct_Longtail_BlockStoreAPI, ...) C.int + func BlockStoreAPIProxy_GetStats(api *C.struct_Longtail_BlockStoreAPI, ...) C.int + func BlockStoreAPIProxy_GetStoredBlock(api *C.struct_Longtail_BlockStoreAPI, blockHash C.uint64_t, ...) C.int + func BlockStoreAPIProxy_PreflightGet(api *C.struct_Longtail_BlockStoreAPI, blockCount C.uint64_t, ...) C.int + func BlockStoreAPIProxy_PutStoredBlock(api *C.struct_Longtail_BlockStoreAPI, ...) C.int + func ChangeVersion(contentBlockStoreAPI Longtail_BlockStoreAPI, ...) error + func GetBlake2HashIdentifier() uint32 + func GetBlake3HashIdentifier() uint32 + func GetBrotliGenericDefaultCompressionType() uint32 + func GetBrotliGenericMaxCompressionType() uint32 + func GetBrotliGenericMinCompressionType() uint32 + func GetBrotliTextDefaultCompressionType() uint32 + func GetBrotliTextMaxCompressionType() uint32 + func GetBrotliTextMinCompressionType() uint32 + func GetLZ4DefaultCompressionType() uint32 + func GetMeowHashIdentifier() uint32 + func GetNoCompressionType() uint32 + func GetZStdDefaultCompressionType() uint32 + func GetZStdMaxCompressionType() uint32 + func GetZStdMinCompressionType() uint32 + func LogProxy_Log(context unsafe.Pointer, level C.int, log *C.char) + func LongtailAlloc(size uint64) unsafe.Pointer + func LongtailFree(data unsafe.Pointer) + func PathFilterAPIProxy_Dispose(api *C.struct_Longtail_API) + func PathFilterAPIProxy_Include(path_filter_api *C.struct_Longtail_PathFilterAPI, root_path *C.char, ...) C.int + func ProgressAPIProxy_Dispose(api *C.struct_Longtail_API) + func ProgressAPIProxy_OnProgress(progress_api *C.struct_Longtail_ProgressAPI, total_count C.uint32_t, ...) + func RestorePointer(ptr unsafe.Pointer) (v interface{}) + func SavePointer(v interface{}) unsafe.Pointer + func SetAssert(assert Assert) + func SetLogLevel(level int) + func SetLogger(logger Logger) + func UnrefPointer(ptr unsafe.Pointer) + func WriteBlockIndexToBuffer(index Longtail_BlockIndex) ([]byte, error) + func WriteContent(sourceStorageAPI Longtail_StorageAPI, ...) error + func WriteContentIndex(storageAPI Longtail_StorageAPI, index Longtail_ContentIndex, path string) error + func WriteContentIndexToBuffer(index Longtail_ContentIndex) ([]byte, error) + func WriteStoredBlockToBuffer(storedBlock Longtail_StoredBlock) ([]byte, error) + func WriteVersion(contentBlockStoreAPI Longtail_BlockStoreAPI, ...) error + func WriteVersionIndex(storageAPI Longtail_StorageAPI, index Longtail_VersionIndex, path string) error + func WriteVersionIndexToBuffer(index Longtail_VersionIndex) ([]byte, error) + type Assert interface + OnAssert func(expression string, file string, line int) + type AsyncGetIndexAPI interface + OnComplete func(content_index Longtail_ContentIndex, err int) + type AsyncGetStoredBlockAPI interface + OnComplete func(stored_block Longtail_StoredBlock, err int) + type AsyncPutStoredBlockAPI interface + OnComplete func(err int) + type BlockStoreAPI interface + Close func() + GetIndex func(asyncCompleteAPI Longtail_AsyncGetIndexAPI) int + GetStats func() (BlockStoreStats, int) + GetStoredBlock func(blockHash uint64, asyncCompleteAPI Longtail_AsyncGetStoredBlockAPI) int + PreflightGet func(blockCount uint64, hashes []uint64, refCounts []uint32) int + PutStoredBlock func(storedBlock Longtail_StoredBlock, ...) int + type BlockStoreStats struct + BlockGetFailCount uint64 + BlockGetRetryCount uint64 + BlockPutFailCount uint64 + BlockPutRetryCount uint64 + BlocksGetCount uint64 + BlocksPutCount uint64 + BytesGetCount uint64 + BytesPutCount uint64 + ChunksGetCount uint64 + ChunksPutCount uint64 + IndexGetCount uint64 + IndexGetFailCount uint64 + IndexGetRetryCount uint64 + type Logger interface + OnLog func(level int, log string) + type Longtail_AsyncGetIndexAPI struct + func CreateAsyncGetIndexAPI(asyncComplete AsyncGetIndexAPI) Longtail_AsyncGetIndexAPI + func (asyncCompleteAPI *Longtail_AsyncGetIndexAPI) OnComplete(content_index Longtail_ContentIndex, errno int) + type Longtail_AsyncGetStoredBlockAPI struct + func CreateAsyncGetStoredBlockAPI(asyncComplete AsyncGetStoredBlockAPI) Longtail_AsyncGetStoredBlockAPI + func (asyncCompleteAPI *Longtail_AsyncGetStoredBlockAPI) OnComplete(stored_block Longtail_StoredBlock, errno int) + type Longtail_AsyncPutStoredBlockAPI struct + func CreateAsyncPutStoredBlockAPI(asyncComplete AsyncPutStoredBlockAPI) Longtail_AsyncPutStoredBlockAPI + func (asyncCompleteAPI *Longtail_AsyncPutStoredBlockAPI) OnComplete(errno int) + type Longtail_BlockIndex struct + func ReadBlockIndexFromBuffer(buffer []byte) (Longtail_BlockIndex, error) + func (blockIndex *Longtail_BlockIndex) Dispose() + func (blockIndex *Longtail_BlockIndex) GetBlockHash() uint64 + func (blockIndex *Longtail_BlockIndex) GetChunkCount() uint32 + func (blockIndex *Longtail_BlockIndex) GetChunkHashes() []uint64 + func (blockIndex *Longtail_BlockIndex) GetChunkSizes() []uint32 + func (blockIndex *Longtail_BlockIndex) GetHashIdentifier() uint32 + func (blockIndex *Longtail_BlockIndex) GetTag() uint32 + type Longtail_BlockStoreAPI struct + func CreateBlockStoreAPI(blockStore BlockStoreAPI) Longtail_BlockStoreAPI + func CreateCacheBlockStore(cacheBlockStore Longtail_BlockStoreAPI, ...) Longtail_BlockStoreAPI + func CreateCompressBlockStore(backingBlockStore Longtail_BlockStoreAPI, ...) Longtail_BlockStoreAPI + func CreateFSBlockStore(storageAPI Longtail_StorageAPI, contentPath string) Longtail_BlockStoreAPI + func CreateFSBlockStoreAPI(storageAPI Longtail_StorageAPI, contentPath string) Longtail_BlockStoreAPI + func CreateRetainingBlockStore(backingBlockStore Longtail_BlockStoreAPI) Longtail_BlockStoreAPI + func CreateShareBlockStore(backingBlockStore Longtail_BlockStoreAPI) Longtail_BlockStoreAPI + func (blockStoreAPI *Longtail_BlockStoreAPI) Dispose() + func (blockStoreAPI *Longtail_BlockStoreAPI) GetIndex(asyncCompleteAPI Longtail_AsyncGetIndexAPI) int + func (blockStoreAPI *Longtail_BlockStoreAPI) GetStats() (BlockStoreStats, int) + func (blockStoreAPI *Longtail_BlockStoreAPI) GetStoredBlock(blockHash uint64, asyncCompleteAPI Longtail_AsyncGetStoredBlockAPI) int + func (blockStoreAPI *Longtail_BlockStoreAPI) PutStoredBlock(storedBlock Longtail_StoredBlock, ...) int + type Longtail_CompressionAPI struct + func CreateBrotliCompressionAPI() Longtail_CompressionAPI + func CreateLZ4CompressionAPI() Longtail_CompressionAPI + func CreateZStdCompressionAPI() Longtail_CompressionAPI + func (compressionAPI *Longtail_CompressionAPI) Dispose() + type Longtail_CompressionRegistryAPI struct + func CreateFullCompressionRegistry() Longtail_CompressionRegistryAPI + func CreateZStdCompressionRegistry() Longtail_CompressionRegistryAPI + func (compressionRegistry *Longtail_CompressionRegistryAPI) Dispose() + type Longtail_ContentIndex struct + func AddContentIndex(localContentIndex Longtail_ContentIndex, ...) (Longtail_ContentIndex, error) + func CreateContentIndex(hashAPI Longtail_HashAPI, chunkHashes []uint64, chunkSizes []uint32, ...) (Longtail_ContentIndex, error) + func CreateContentIndexFromBlocks(maxBlockSize uint32, maxChunksPerBlock uint32, ...) (Longtail_ContentIndex, error) + func CreateMissingContent(hashAPI Longtail_HashAPI, contentIndex Longtail_ContentIndex, ...) (Longtail_ContentIndex, error) + func MergeContentIndex(localContentIndex Longtail_ContentIndex, ...) (Longtail_ContentIndex, error) + func ReadContentIndex(storageAPI Longtail_StorageAPI, path string) (Longtail_ContentIndex, error) + func ReadContentIndexFromBuffer(buffer []byte) (Longtail_ContentIndex, error) + func RetargetContent(referenceContentIndex Longtail_ContentIndex, ...) (Longtail_ContentIndex, error) + func (contentIndex *Longtail_ContentIndex) Dispose() + func (contentIndex *Longtail_ContentIndex) GetBlockCount() uint64 + func (contentIndex *Longtail_ContentIndex) GetBlockHashes() []uint64 + func (contentIndex *Longtail_ContentIndex) GetChunkCount() uint64 + func (contentIndex *Longtail_ContentIndex) GetHashIdentifier() uint32 + func (contentIndex *Longtail_ContentIndex) GetMaxBlockSize() uint32 + func (contentIndex *Longtail_ContentIndex) GetMaxChunksPerBlock() uint32 + func (contentIndex *Longtail_ContentIndex) GetVersion() uint32 + func (contentIndex *Longtail_ContentIndex) IsValid() bool + type Longtail_FileInfos struct + func GetFilesRecursively(storageAPI Longtail_StorageAPI, pathFilter Longtail_PathFilterAPI, ...) (Longtail_FileInfos, error) + func (fileInfos *Longtail_FileInfos) Dispose() + func (fileInfos *Longtail_FileInfos) GetFileCount() uint32 + func (fileInfos *Longtail_FileInfos) GetFilePermissions() []uint16 + func (fileInfos *Longtail_FileInfos) GetFileSizes() []uint64 + func (fileInfos *Longtail_FileInfos) GetPathCount() uint32 + func (fileInfos Longtail_FileInfos) GetPath(index uint32) string + type Longtail_HashAPI struct + func CreateBlake2HashAPI() Longtail_HashAPI + func CreateBlake3HashAPI() Longtail_HashAPI + func CreateMeowHashAPI() Longtail_HashAPI + func (hashAPI *Longtail_HashAPI) Dispose() + func (hashAPI *Longtail_HashAPI) GetIdentifier() uint32 + type Longtail_HashRegistryAPI struct + func CreateBlake3HashRegistry() Longtail_HashRegistryAPI + func CreateFullHashRegistry() Longtail_HashRegistryAPI + func (hashRegistry *Longtail_HashRegistryAPI) Dispose() + func (hashRegistry *Longtail_HashRegistryAPI) GetHashAPI(hashIdentifier uint32) (Longtail_HashAPI, error) + type Longtail_JobAPI struct + func CreateBikeshedJobAPI(workerCount uint32) Longtail_JobAPI + func (jobAPI *Longtail_JobAPI) Dispose() + type Longtail_PathFilterAPI struct + func CreatePathFilterAPI(pathFilter PathFilterAPI) Longtail_PathFilterAPI + type Longtail_ProgressAPI struct + func CreateProgressAPI(progress ProgressAPI) Longtail_ProgressAPI + func (progressAPI *Longtail_ProgressAPI) Dispose() + type Longtail_StorageAPI struct + func CreateFSStorageAPI() Longtail_StorageAPI + func CreateInMemStorageAPI() Longtail_StorageAPI + func (storageAPI *Longtail_StorageAPI) Dispose() + func (storageAPI *Longtail_StorageAPI) ReadFromStorage(rootPath string, path string) ([]byte, error) + func (storageAPI *Longtail_StorageAPI) WriteToStorage(rootPath string, path string, blockData []byte) error + type Longtail_StoredBlock struct + func CreateStoredBlock(blockHash uint64, hashIdentifier uint32, compressionType uint32, ...) (Longtail_StoredBlock, int) + func ReadStoredBlockFromBuffer(buffer []byte) (Longtail_StoredBlock, error) + func (storedBlock *Longtail_StoredBlock) Dispose() + func (storedBlock *Longtail_StoredBlock) GetBlockIndex() Longtail_BlockIndex + func (storedBlock *Longtail_StoredBlock) GetChunksBlockData() []byte + type Longtail_VersionDiff struct + func CreateVersionDiff(sourceVersionIndex Longtail_VersionIndex, ...) (Longtail_VersionDiff, error) + func (versionDiff *Longtail_VersionDiff) Dispose() + type Longtail_VersionIndex struct + func CreateVersionIndex(storageAPI Longtail_StorageAPI, hashAPI Longtail_HashAPI, ...) (Longtail_VersionIndex, error) + func ReadVersionIndex(storageAPI Longtail_StorageAPI, path string) (Longtail_VersionIndex, error) + func ReadVersionIndexFromBuffer(buffer []byte) (Longtail_VersionIndex, error) + func (versionIndex *Longtail_VersionIndex) Dispose() + func (versionIndex *Longtail_VersionIndex) GetAssetCount() uint32 + func (versionIndex *Longtail_VersionIndex) GetChunkCount() uint32 + func (versionIndex *Longtail_VersionIndex) GetChunkHashes() []uint64 + func (versionIndex *Longtail_VersionIndex) GetChunkSizes() []uint32 + func (versionIndex *Longtail_VersionIndex) GetChunkTags() []uint32 + func (versionIndex *Longtail_VersionIndex) GetHashIdentifier() uint32 + func (versionIndex *Longtail_VersionIndex) GetTargetChunkSize() uint32 + func (versionIndex *Longtail_VersionIndex) GetVersion() uint32 + type PathFilterAPI interface + Include func(rootPath string, assetFolder string, assetName string, isDir bool, size uint64, ...) bool + type ProgressAPI interface + OnProgress func(totalCount uint32, doneCount uint32) Other modules containing this package github.com/DanEngelbrecht/golongtail