files

package
v0.0.0-...-3231407 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileChunkKeySep = "_"
)

Variables

View Source
var CacheBlockSize int = 1 * 1024 * 1024 // 1 Mib

CacheBlockSize is the size of a single cached block.

Functions

func FetchFile

func FetchFile(r remote.Reader, name string, offset int64, count int) ([]byte, error)

Fetchfile gets the content of a file from the given offset using a remote reader.

func FileChunkKey

func FileChunkKey(name string, offset, cacheBlockSize int64) string

FileChunkKey returns the p2p lookup key for the given chunk of a file.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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