v3.5.13 Latest Latest

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 4




This section is empty.


This section is empty.


This section is empty.


type GrpcRecorder added in v3.5.1

type GrpcRecorder struct {
	// contains filtered or unexported fields

func (*GrpcRecorder) RecordedRequests added in v3.5.1

func (ri *GrpcRecorder) RecordedRequests() []RequestInfo

func (*GrpcRecorder) UnaryInterceptor added in v3.5.1

func (ri *GrpcRecorder) UnaryInterceptor() grpc.UnaryServerInterceptor

type RequestInfo added in v3.5.1

type RequestInfo struct {
	FullMethod string
	Authority  string

type StubServer

type StubServer struct {

	// Network and Address are parameters for Listen. Defaults will be used if these are empty before Start.
	Network string
	Address string
	// contains filtered or unexported fields

StubServer is a server that is easy to customize within individual test cases.

func New

func New(testService testpb.TestServiceServer) *StubServer

func NewDummyStubServer

func NewDummyStubServer(body []byte) *StubServer

NewDummyStubServer creates a simple test server that serves Unary calls with responses with the given payload.

func (*StubServer) Addr

func (ss *StubServer) Addr() string

Addr gets the address the server listening on.

func (*StubServer) Start

func (ss *StubServer) Start(sopts []grpc.ServerOption, dopts ...grpc.DialOption) error

Start starts the server and creates a client connected to it.

func (*StubServer) Stop

func (ss *StubServer) Stop()

Stop stops ss and cleans up all resources it consumed.

Jump to

Keyboard shortcuts

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