Documentation ¶
Overview ¶
Package drpcmanager reads packets from a transport to make streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the logic of managing a transport for a drpc client or server. It ensures that the connection is always being read from, that it is closed in the case that the manager is and forwarding drpc protocol messages to the appropriate stream.
func NewWithOptions ¶ added in v0.0.7
NewWithOptions returns a new manager for the transport. It uses the provided options to manage details of how it uses it.
func (*Manager) NewClientStream ¶ added in v0.0.5
NewClientStream starts a stream on the managed transport for use by a client.
func (*Manager) NewServerStream ¶ added in v0.0.5
func (m *Manager) NewServerStream(ctx context.Context) (stream *drpcstream.Stream, rpc string, err error)
NewServerStream starts a stream on the managed transport for use by a server. It does this by waiting for the client to issue an invoke message and returning the details.
type Options ¶ added in v0.0.7
type Options struct { // WriterBufferSize controls the size of the buffer that we will fill before // flushing. Normal writes to streams typically issue a flush explicitly. WriterBufferSize int // Stream are passed to any streams the manager creates. Stream drpcstream.Options }
Options controls configuration settings for a manager.