Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultBufferSize = 1024 * 100 // 100k
)
Variables ¶
This section is empty.
Functions ¶
func WrapNoopCloser ¶
func WrapNoopCloser(rw io.ReadWriter) io.ReadWriteCloser
WrapNoopCloser wraps a io.ReadWriter in a io.ReadWriteCloser that does nothing on "Close"
Types ¶
type Backoff ¶
type Backoff struct {
// contains filtered or unexported fields
}
Backoff is a waiter that sleeps when Wait() is called
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn provides a wrapper around an io.ReadWriteCloser for sending size delimited data over any reader/writer
func NewConn ¶
func NewConn(rwc io.ReadWriteCloser) *Conn
NewConn returns a new Conn with the appropriate configuration
func (*Conn) Generate ¶
func (c *Conn) Generate(f func() Message) (<-chan Message, context.CancelFunc)
Generate returns a channel that will recieve messages as they come in off the line Only safe to run once per Conn
func (*Conn) Next ¶
Next reads the next message off the line and unmarshals it into the given message
type Message ¶
type Message interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
type NoopCloser ¶
type NoopCloser struct {
io.ReadWriter
}
NoopCloser io.ReadWriteCloser has a noop for "Close"
type NoopWaiter ¶
type NoopWaiter struct { }
NoopWaiter does nothing when called
func (*NoopWaiter) Reset ¶
func (n *NoopWaiter) Reset()
func (*NoopWaiter) Wait ¶
func (n *NoopWaiter) Wait()
Click to show internal directories.
Click to hide internal directories.