bufconn

package
Version: v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCListener

type GRPCListener struct {
	Listener *bufconn.Listener
	Conn     *grpc.ClientConn
}

GRPCListener handles gRPC connections using a bufconn listener. This is useful for testing when it's unnecessary to have a live gRPC server running. The normal workflow is to call New() to start the listener, Connect() to start a gRPC connection under which to send client calls, Close() to close the connection, and Release() to close the listener.

func New

func New(bufSize int) *GRPCListener

func (*GRPCListener) Close

func (g *GRPCListener) Close()

func (*GRPCListener) Connect

func (g *GRPCListener) Connect() (err error)

func (*GRPCListener) Release

func (s *GRPCListener) Release()

Source Files

Jump to

Keyboard shortcuts

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