Documentation ¶
Overview ¶
Package streamio contains wrappers intended for turning gRPC streams that send/receive messages with a []byte field into io.Writers and io.Readers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WriteBufferSize = 128 * 1024
WriteBufferSize is the largest []byte that Write() will pass to its underlying send function.
Functions ¶
func NewReader ¶
NewReader turns receiver into an io.Reader. Errors from the receiver function are passed on unmodified. This means receiver should emit io.EOF when done.
func NewSyncWriter ¶
NewSyncWriter turns sender into an io.Writer. The sender callback will receive []byte arguments of length at most WriteBufferSize. All calls to the sender will be synchronized via the mutex.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.