Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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.
Click to show internal directories.
Click to hide internal directories.