Documentation
¶
Overview ¶
Package errorstesting is a generated protocol buffer package.
It is generated from these files:
empty.proto
It has these top-level messages:
Empty
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTestServiceServer ¶
func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer)
Types ¶
type Empty ¶
type Empty struct {
}
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type TestContext ¶
type TestContext struct {
ServerOpts []grpc.ServerOption
ClientOpts []grpc.DialOption
Service TestServiceServer
Client TestServiceClient
// contains filtered or unexported fields
}
TestContext is a testing helper for generating a gRPC server and a gRPC client.
func CreateTestContext ¶
func CreateTestContext(t *testing.T) *TestContext
CreateTestContext returns a new TestContext object.
func (*TestContext) AddUnaryServerInterceptor ¶
func (c *TestContext) AddUnaryServerInterceptor(i grpc.UnaryServerInterceptor)
AddUnaryServerInterceptor sets interceptors to a test server.
func (*TestContext) Setup ¶
func (c *TestContext) Setup()
Setup starts a server and creates a client connection.
func (*TestContext) Teardown ¶
func (c *TestContext) Teardown()
Teardown disconnects a client connection and stops a server
type TestServiceClient ¶
type TestServiceClient interface {
EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}
func NewTestServiceClient ¶
func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient
Click to show internal directories.
Click to hide internal directories.