grpc-go-addons: Index | Files | Directories

package grpc_testing

import ""


Package Files

interceptor_suite.go mutex_readerwriter.go pingservice.go


const (
    // DefaultPongValue is the default value used.
    DefaultResponseValue = "default_response_value"
    // ListResponseCount is the expeted number of responses to PingList
    ListResponseCount = 100

type InterceptorTestSuite Uses

type InterceptorTestSuite struct {

    TestService pb_testproto.TestServiceServer
    ServerOpts  []grpc.ServerOption
    ClientOpts  []grpc.DialOption

    ServerListener net.Listener
    Server         *grpc.Server

    Client pb_testproto.TestServiceClient
    // contains filtered or unexported fields

InterceptorTestSuite is a testify/Suite that starts a gRPC PingService server and a client.

func (*InterceptorTestSuite) DeadlineCtx Uses

func (s *InterceptorTestSuite) DeadlineCtx(deadline time.Time) context.Context

func (*InterceptorTestSuite) NewClient Uses

func (s *InterceptorTestSuite) NewClient(dialOpts ...grpc.DialOption) pb_testproto.TestServiceClient

func (*InterceptorTestSuite) ServerAddr Uses

func (s *InterceptorTestSuite) ServerAddr() string

func (*InterceptorTestSuite) SetupSuite Uses

func (s *InterceptorTestSuite) SetupSuite()

func (*InterceptorTestSuite) SimpleCtx Uses

func (s *InterceptorTestSuite) SimpleCtx() context.Context

func (*InterceptorTestSuite) TearDownSuite Uses

func (s *InterceptorTestSuite) TearDownSuite()

type MutexReadWriter Uses

type MutexReadWriter struct {
    // contains filtered or unexported fields

MutexReadWriter is a io.ReadWriter that can be read and worked on from multiple go routines.

func NewMutexReadWriter Uses

func NewMutexReadWriter(rw io.ReadWriter) *MutexReadWriter

NewMutexReadWriter creates a new thread-safe io.ReadWriter.

func (*MutexReadWriter) Read Uses

func (m *MutexReadWriter) Read(p []byte) (int, error)

Read implements the io.Reader interface.

func (*MutexReadWriter) Write Uses

func (m *MutexReadWriter) Write(p []byte) (int, error)

Write implements the io.Writer interface.

type TestPingService Uses

type TestPingService struct {
    T *testing.T

func (*TestPingService) Ping Uses

func (s *TestPingService) Ping(ctx context.Context, ping *pb_testproto.PingRequest) (*pb_testproto.PingResponse, error)

func (*TestPingService) PingEmpty Uses

func (s *TestPingService) PingEmpty(ctx context.Context, _ *pb_testproto.Empty) (*pb_testproto.PingResponse, error)

func (*TestPingService) PingError Uses

func (s *TestPingService) PingError(ctx context.Context, ping *pb_testproto.PingRequest) (*pb_testproto.Empty, error)

func (*TestPingService) PingList Uses

func (s *TestPingService) PingList(ping *pb_testproto.PingRequest, stream pb_testproto.TestService_PingListServer) error

func (*TestPingService) PingStream Uses

func (s *TestPingService) PingStream(stream pb_testproto.TestService_PingStreamServer) error


testprotoPackage mwitkow_testproto is a generated protocol buffer package.

Package grpc_testing imports 15 packages (graph). Updated 2019-07-13. Refresh now. Tools for package owners.