Documentation ¶
Overview ¶
Package streamer provides functionalities to work with server-side RPC stream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientStreamerPayload ¶
func ClientStreamerPayload(s *ClientStreamer) (interface{}, error)
ClientStreamerPayload tees the stream till io.EOF and return the payload.
Types ¶
type BidirectionalStreamer ¶
type BidirectionalStreamer struct { grpc.ServerStream // contains filtered or unexported fields }
BidirectionalStreamer is a client-stream RPC.
func NewBidirectionalStreamer ¶
func NewBidirectionalStreamer(s grpc.ServerStream, input reflect.Type, output reflect.Type) *BidirectionalStreamer
NewBidirectionalStreamer initiates a new BidirectionalStreamer.
func (*BidirectionalStreamer) InputType ¶
func (s *BidirectionalStreamer) InputType() reflect.Type
InputType returns the output type of the stream.
func (*BidirectionalStreamer) OutputType ¶
func (s *BidirectionalStreamer) OutputType() reflect.Type
OutputType returns the output type of the stream.
type ClientStreamer ¶
type ClientStreamer struct { grpc.ServerStream // contains filtered or unexported fields }
ClientStreamer is a client-stream RPC.
func NewClientStreamer ¶
func NewClientStreamer(s grpc.ServerStream, input reflect.Type, output reflect.Type) *ClientStreamer
NewClientStreamer initiates a new ClientStreamer.
func TeeClientStreamer ¶
func TeeClientStreamer(s *ClientStreamer) *ClientStreamer
TeeClientStreamer tees the original client stream and return the buffered stream.
func (*ClientStreamer) InputType ¶
func (s *ClientStreamer) InputType() reflect.Type
InputType returns the output type of the stream.
func (*ClientStreamer) OutputType ¶
func (s *ClientStreamer) OutputType() reflect.Type
OutputType returns the output type of the stream.
type ServerStreamer ¶
type ServerStreamer struct { grpc.ServerStream // contains filtered or unexported fields }
ServerStreamer is a server-stream RPC.
func NewServerStreamer ¶
func NewServerStreamer(s grpc.ServerStream, output reflect.Type) *ServerStreamer
NewServerStreamer creates a new ServerStreamer.
func (*ServerStreamer) OutputType ¶
func (s *ServerStreamer) OutputType() reflect.Type
OutputType returns the output type of the stream.