streamer

package
Version: v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 4 Imported by: 0

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 added in v0.10.0

type BidirectionalStreamer struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

BidirectionalStreamer is a client-stream RPC.

func NewBidirectionalStreamer added in v0.10.0

func NewBidirectionalStreamer(s grpc.ServerStream, input reflect.Type, output reflect.Type) *BidirectionalStreamer

NewBidirectionalStreamer initiates a new BidirectionalStreamer.

func (*BidirectionalStreamer) InputType added in v0.10.0

func (s *BidirectionalStreamer) InputType() reflect.Type

InputType returns the output type of the stream.

func (*BidirectionalStreamer) OutputType added in v0.10.0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL