Documentation ¶
Overview ¶
Package chanio provides a way to use channels as io.Reader and io.Writer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChanReader ¶
type ChanReader struct {
// contains filtered or unexported fields
}
Read implements io.Reader.
Use NewChanReader to obtain a new ChanReader.
func NewChanReader ¶
func NewChanReader(ch <-chan []byte) (*ChanReader, error)
NewChanReader returns a new ChanReader reading from ch. The provided channel must not be nil.
type ChanWriter ¶
type ChanWriter struct {
// contains filtered or unexported fields
}
Write implements io.Writer.
Use NewChanWriter to obtain a new ChanWriter.
func NewChanWriter ¶
func NewChanWriter(ch chan<- []byte) (*ChanWriter, error)
NewChanWriter returns a new ChanWriter writing to ch. The provided channel must not be nil.
Click to show internal directories.
Click to hide internal directories.