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 Target string 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, target string) *GRPCListener
func (*GRPCListener) Close ¶
func (g *GRPCListener) Close()
func (*GRPCListener) Connect ¶
func (g *GRPCListener) Connect(ctx context.Context, opts ...grpc.DialOption) (err error)
func (*GRPCListener) Release ¶
func (s *GRPCListener) Release()
Click to show internal directories.
Click to hide internal directories.