Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBidirectionalChannel ¶
func CreateBidirectionalChannel() (FileChannel, FileChannel, error)
CreateBidirectionalChannel creates a pair of FileChannels that are connected to each other.
Types ¶
type FileChannel ¶
type FileChannel interface { io.ReadWriteCloser // Reader returns the file that is used for reading. Reader() *os.File // Writer returns the file that is used for writing. Writer() *os.File }
FileChannel is a unidirectional channel for file I/O
type ReadWritePair ¶
type ReadWritePair struct {
// contains filtered or unexported fields
}
func NewReadWritePair ¶
func NewReadWritePair(r *os.File, w *os.File) *ReadWritePair
NewReadWritePair creates a new FileChannel that uses the given files
func (*ReadWritePair) Close ¶
func (rw *ReadWritePair) Close() error
func (*ReadWritePair) Reader ¶
func (rw *ReadWritePair) Reader() *os.File
func (*ReadWritePair) Writer ¶
func (rw *ReadWritePair) Writer() *os.File
Click to show internal directories.
Click to hide internal directories.