pipe

package
v0.0.0-...-ee16fa1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuffSizeAlign = bytesize.KB * 4
	FileSizeAlign = bytesize.MB * 4
)

Variables

This section is empty.

Functions

func OpenFile

func OpenFile(fileName string, exclusive bool) (*os.File, error)

func OpenTempFile

func OpenTempFile(dir, prefix string) (*os.File, error)

func Pipe

func Pipe() (*PipeReader, *PipeWriter)

func PipeWithFile

func PipeWithFile(buffSize, fileSize int, f *os.File) (*PipeReader, *PipeWriter)

func PipeWithSize

func PipeWithSize(buffSize int) (*PipeReader, *PipeWriter)

Types

type PipeCloser

type PipeCloser interface {
	Close() error
	CloseWithError(err error) error
}

type PipeReader

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

func (*PipeReader) Close

func (r *PipeReader) Close() error

func (*PipeReader) CloseWithError

func (r *PipeReader) CloseWithError(err error) error

func (*PipeReader) Read

func (r *PipeReader) Read(b []byte) (int, error)

type PipeWriter

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

func (*PipeWriter) Close

func (w *PipeWriter) Close() error

func (*PipeWriter) CloseWithError

func (w *PipeWriter) CloseWithError(err error) error

func (*PipeWriter) Write

func (w *PipeWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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