io

package
v0.0.0-...-fd2add7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package io facilitates sharing io reader/writer/closers across workers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewXReadCloser

func NewXReadCloser(u io.ReadCloser) circuit.X

func NewXReadWriteCloser

func NewXReadWriteCloser(u io.ReadWriteCloser) circuit.X

func NewXReadWriter

func NewXReadWriter(u io.ReadWriter) circuit.X

func NewXReader

func NewXReader(u io.Reader) circuit.X

func NewXWriteCloser

func NewXWriteCloser(u io.WriteCloser) circuit.X

Types

type XCloser

type XCloser struct {
	io.Closer
}

XCloser is a cross-worker exportable object that exposes an underlying local io.Writer.

func NewXCloser

func NewXCloser(u io.Closer) *XCloser

NewXCloser attaches a finalizer to the object which calls Close. In cases when a cross-interface to this object is lost because of a failed remote worker, the attached finalizer will ensure that before we forget this object the channel it encloses will be closed.

func (XCloser) Close

func (x XCloser) Close() error

type XReadCloser

type XReadCloser struct {
	XReader
	*XCloser
}

XReadCloser

type XReadWriteCloser

type XReadWriteCloser struct {
	XReader
	XWriter
	*XCloser
}

XReadWriteCloser

type XReadWriter

type XReadWriter struct {
	XReader
	XWriter
}

XReadWriter

type XReader

type XReader struct {
	io.Reader
}

XReader is a cross-worker exportable object that exposes an underlying local io.Reader.

func (XReader) Read

func (x XReader) Read(n int) ([]byte, error)

type XWriteCloser

type XWriteCloser struct {
	XWriter
	*XCloser
}

XWriteCloser

type XWriter

type XWriter struct {
	io.Writer
}

XWriter is a cross-worker exportable object that exposes an underlying local io.Writer.

func (XWriter) Write

func (x XWriter) Write(p []byte) (int, error)

type YCloser

type YCloser struct {
	circuit.X
}

YCloser

func (YCloser) Close

func (y YCloser) Close() error

type YReadCloser

type YReadCloser struct {
	YReader
	YCloser
}

YReadCloser

func NewYReadCloser

func NewYReadCloser(u interface{}) *YReadCloser

type YReadWriteCloser

type YReadWriteCloser struct {
	YReader
	YWriter
	YCloser
}

YReadWriteCloser

func NewYReadWriteCloser

func NewYReadWriteCloser(u interface{}) *YReadWriteCloser

type YReadWriter

type YReadWriter struct {
	YReader
	YWriter
}

YReadWriter

func NewYReadWriter

func NewYReadWriter(u interface{}) *YReadWriter

type YReader

type YReader struct {
	circuit.X
}

YReader

func NewYReader

func NewYReader(u interface{}) YReader

func (YReader) Read

func (y YReader) Read(p []byte) (n int, err error)

type YWriteCloser

type YWriteCloser struct {
	YWriter
	YCloser
}

YWriteCloser

func NewYWriteCloser

func NewYWriteCloser(u interface{}) *YWriteCloser

type YWriter

type YWriter struct {
	circuit.X
}

YWriter

func (YWriter) Write

func (y YWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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