splice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: BSD-3-Clause Imports: 7 Imported by: 8

Documentation

Index

Constants

View Source
const DefaultPipeSize = 16 * 4096

From manpage on ubuntu Lucid:

Since Linux 2.6.11, the pipe capacity is 65536 bytes.

View Source
const F_GETPIPE_SZ = 1032
View Source
const F_SETPIPE_SZ = 1031

Variables

This section is empty.

Functions

func ClearSplicePool

func ClearSplicePool()

func CopyFds

func CopyFds(dst *os.File, src *os.File) (err error)

func CopyFile

func CopyFile(dstName string, srcName string, mode int) error

Argument ordering follows io.Copy.

func Done

func Done(p *Pair)

Done returns the pipe pair to pool.

func Drop

func Drop(p *Pair)

Closes and discards pipe pair.

func MaxPipeSize

func MaxPipeSize() int

func Resizable

func Resizable() bool

func SpliceCopy

func SpliceCopy(dst *os.File, src *os.File, p *Pair) (int64, error)

func Total

func Total() int

func Used

func Used() int

Types

type Pair

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

func Get

func Get() (*Pair, error)

func (*Pair) Cap

func (p *Pair) Cap() int

func (*Pair) Close

func (p *Pair) Close() error

func (*Pair) Grow

func (p *Pair) Grow(n int) error

func (*Pair) LoadFrom

func (p *Pair) LoadFrom(fd uintptr, sz int) (int, error)

func (*Pair) LoadFromAt

func (p *Pair) LoadFromAt(fd uintptr, sz int, off int64) (int, error)

func (*Pair) MaxGrow

func (p *Pair) MaxGrow()

func (*Pair) Read

func (p *Pair) Read(d []byte) (n int, err error)

func (*Pair) ReadFd

func (p *Pair) ReadFd() uintptr

func (*Pair) Write

func (p *Pair) Write(d []byte) (n int, err error)

func (*Pair) WriteFd

func (p *Pair) WriteFd() uintptr

func (*Pair) WriteTo

func (p *Pair) WriteTo(fd uintptr, n int) (int, error)

Jump to

Keyboard shortcuts

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