gio

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBuffer

func CopyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error)

https://github.com/xtaci/kcptun/blob/master/server/main.go io.CopyBuffer has extra tests for interface like io.ReaderFrom and io.WriterTo which is not efficient in memory management from tests

func CopyEx

func CopyEx(dst io.Writer, dstWriteCb SetDeadlineCallback, src io.Reader, srcReadCb SetDeadlineCallback, timeout time.Duration, sizeCallback CopiedSizeCallback) (written int64, err error)

https://github.com/efarrer/iothrottler/ https://github.com/jwkohnen/bwio/ limit copy speed / duration, read copied size

func CopyTimeout

func CopyTimeout(dst io.Writer, dstWriteCb SetDeadlineCallback, src io.Reader, srcReadCb SetDeadlineCallback, timeout time.Duration) (written int64, err error)

Forked from standard library io.Copy

Types

type CopiedSizeCallback

type CopiedSizeCallback func(size int64)

type SetDeadlineCallback

type SetDeadlineCallback func(t time.Time) error

Jump to

Keyboard shortcuts

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