filetransfer

package
v0.0.0-...-3544159 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvertiseFile

func AdvertiseFile(
	ctx context.Context,
	parallel int64,
	d tls.Dialer,
	syncerRaddr string,
	src string,
	advertisedSrc string,
	blocksize int64,
	onDone func(),
	pollDuration time.Duration,
	verbose bool,
) error

func GetHashesForBlocks

func GetHashesForBlocks(
	parallel int64,
	file string,
	blocksize int64,
) ([]string, int64, error)

func ReceiveFile

func ReceiveFile(
	parallel int64,
	file *os.File,
	path string,
	blocksize int64,
	conn io.ReadWriter,
	verbose bool,
) error

func ReceiveFileLoop

func ReceiveFileLoop(
	ctx context.Context,
	parallel int64,
	d tls.Dialer,
	syncerRaddr string,
	getAccept func(src string) bool,
	getDstPath func(src string) string,
	blocksize int64,
	once func(src string) bool,
	verbose bool,
) error

func SendFile

func SendFile(
	parallel int64,
	file *os.File,
	path string,
	blocksize int64,
	conn io.ReadWriter,
	verbose bool,
) (int64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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