testgrpc

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(t *testing.T, addr string) (*Client, error)

func (*Client) ClientPB

func (cl *Client) ClientPB() testpb.TestClient

func (*Client) Close

func (cl *Client) Close() error

func (*Client) ErrorWithCode

func (cl *Client) ErrorWithCode(ctx context.Context, code string) error

func (*Client) StreamThenError

func (cl *Client) StreamThenError(count int, code string) (int, error)

func (*Client) WrapErrorWithCode

func (cl *Client) WrapErrorWithCode(code string, wraps int64) error

type Server

type Server struct{}

func NewServer

func NewServer(t *testing.T, l net.Listener) (*Server, func())

func (*Server) ErrorWithCode

func (srv *Server) ErrorWithCode(ctx context.Context,
	req *testpb.ErrorWithCodeRequest,
) (*testpb.Empty, error)

func (*Server) StreamThenError

func (srv *Server) StreamThenError(req *testpb.StreamRequest, ss testpb.Test_StreamThenErrorServer) error

func (*Server) WrapErrorWithCode

func (srv *Server) WrapErrorWithCode(ctx context.Context,
	req *testpb.WrapErrorWithCodeRequest,
) (*testpb.Empty, error)

Jump to

Keyboard shortcuts

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