golongtail

package module
v0.0.0-...-2de2ca6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeVersion

func ChangeVersion(
	contentStorageAPI Longtail_StorageAPI,
	versionStorageAPI Longtail_StorageAPI,
	hashAPI Longtail_HashAPI,
	jobAPI Longtail_JobAPI,
	progressFunc ProgressFunc,
	progressContext interface{},
	compressionRegistryAPI Longtail_CompressionRegistryAPI,
	contentIndex Longtail_ContentIndex,
	sourceVersionIndex Longtail_VersionIndex,
	targetVersionIndex Longtail_VersionIndex,
	versionDiff Longtail_VersionDiff,
	contentFolderPath string,
	versionFolderPath string) error

ChangeVersion ...

func ClearAssert

func ClearAssert()

ClearAssert ...

func ClearLogger

func ClearLogger(logger unsafe.Pointer)

ClearLogger ...

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 GetLizardDefaultCompressionType

func GetLizardDefaultCompressionType() uint32

GetLizardDefaultCompressionType ...

func GetLizardMaxCompressionType

func GetLizardMaxCompressionType() uint32

GetLizardMaxCompressionType ...

func GetLizardMinCompressionType

func GetLizardMinCompressionType() uint32

GetLizardMinCompressionType ...

func GetMeowHashIdentifier

func GetMeowHashIdentifier() uint32

GetMeowHashIdentifier() ...

func GetNoCompressionType

func GetNoCompressionType() uint32

GetNoCompressionType ...

func GetPath

func GetPath(paths Longtail_Paths, index uint32) string

GetPath ...

func GetVersionIndexPath

func GetVersionIndexPath(vindex Longtail_VersionIndex, index uint32) string

GetVersionIndexPath ...

func GetZStdDefaultCompressionType

func GetZStdDefaultCompressionType() uint32

GetZStdDefaultCompressionType ...

func GetZStdMaxCompressionType

func GetZStdMaxCompressionType() uint32

GetZStdMaxCompressionType ...

func GetZStdMinCompressionType

func GetZStdMinCompressionType() uint32

GetZStdMinCompressionType ...

func LongtailAlloc

func LongtailAlloc(size uint64) unsafe.Pointer

LongtailAlloc ...

func LongtailFree

func LongtailFree(data unsafe.Pointer)

LongtailFree ...

func ReadFromStorage

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

ReadFromStorage ...

func RestorePointer

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

func SavePointer

func SavePointer(v interface{}) unsafe.Pointer

func SetAssert

func SetAssert(assertFunc assertFunc, assertContext interface{})

SetAssert ...

func SetLogLevel

func SetLogLevel(level int)

SetLogLevel ...

func SetLogger

func SetLogger(logFunc logFunc, logContext interface{}) unsafe.Pointer

SetLogger ...

func UnrefPointer

func UnrefPointer(ptr unsafe.Pointer)

func WriteContent

func WriteContent(
	sourceStorageAPI Longtail_StorageAPI,
	targetStorageAPI Longtail_StorageAPI,
	compressionRegistryAPI Longtail_CompressionRegistryAPI,
	jobAPI Longtail_JobAPI,
	progressFunc ProgressFunc,
	progressContext interface{},
	contentIndex Longtail_ContentIndex,
	versionIndex Longtail_VersionIndex,
	versionFolderPath string,
	contentFolderPath 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 WriteToStorage

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

WriteToStorage ...

func WriteVersion

func WriteVersion(
	contentStorageAPI Longtail_StorageAPI,
	versionStorageAPI Longtail_StorageAPI,
	compressionRegistryAPI Longtail_CompressionRegistryAPI,
	jobAPI Longtail_JobAPI,
	progressFunc ProgressFunc,
	progressContext interface{},
	contentIndex Longtail_ContentIndex,
	versionIndex Longtail_VersionIndex,
	contentFolderPath string,
	versionFolderPath string) 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 Longtail_CompressionAPI

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

func CreateBrotliCompressionAPI

func CreateBrotliCompressionAPI() Longtail_CompressionAPI

CreateBrotliCompressionAPI ...

func CreateLizardCompressionAPI

func CreateLizardCompressionAPI() Longtail_CompressionAPI

CreateLizardCompressionAPI ...

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 CreateDefaultCompressionRegistry

func CreateDefaultCompressionRegistry() Longtail_CompressionRegistryAPI

Longtail_CreateDefaultCompressionRegistry ...

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,
	chunkCount uint64,
	chunkHashes []uint64,
	chunkSizes []uint32,
	compressionTypes []uint32,
	maxBlockSize uint32,
	maxChunksPerBlock uint32) (Longtail_ContentIndex, error)

CreateContentIndex ...

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 ReadContent

func ReadContent(
	sourceStorageAPI Longtail_StorageAPI,
	hashAPI Longtail_HashAPI,
	jobAPI Longtail_JobAPI,
	progressFunc ProgressFunc,
	progressContext interface{},
	contentFolderPath string) (Longtail_ContentIndex, error)

ReadContent ...

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) GetHashAPI

func (contentIndex *Longtail_ContentIndex) GetHashAPI() uint32

func (*Longtail_ContentIndex) GetVersion

func (contentIndex *Longtail_ContentIndex) GetVersion() uint32

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) 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() ...

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 GetPathsForContentBlocks

func GetPathsForContentBlocks(contentIndex Longtail_ContentIndex) (Longtail_Paths, error)

GetPathsForContentBlocks ...

func (*Longtail_Paths) Dispose

func (paths *Longtail_Paths) Dispose()

func (*Longtail_Paths) GetPathCount

func (paths *Longtail_Paths) GetPathCount() uint32

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() ...

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,
	progressFunc ProgressFunc,
	progressContext interface{},
	rootPath string,
	paths Longtail_Paths,
	assetSizes []uint64,
	assetCompressionTypes []uint32,
	maxChunkSize uint32) (Longtail_VersionIndex, error)

CreateVersionIndexUtil ...

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) GetHashAPI

func (versionIndex *Longtail_VersionIndex) GetHashAPI() uint32

func (*Longtail_VersionIndex) GetVersion

func (versionIndex *Longtail_VersionIndex) GetVersion() uint32

type ProgressFunc

type ProgressFunc func(context interface{}, total int, current int)

Jump to

Keyboard shortcuts

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