test

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package test contains functions used by interop client/server.

Copied from https://github.com/grpc/grpc-go/tree/v1.61.0/interop That package was not intended to be used by external code. See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4896

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientNewPayload

func ClientNewPayload(t testpb.PayloadType, size int) *testpb.Payload

ClientNewPayload returns a payload of the given type and size.

func DoClientStreaming

func DoClientStreaming(ctx context.Context, tc testpb.TestServiceClient, args ...grpc.CallOption)

DoClientStreaming performs a client streaming RPC.

func DoEmptyStream

func DoEmptyStream(ctx context.Context, tc testpb.TestServiceClient, args ...grpc.CallOption)

DoEmptyStream sets up a bi-directional streaming with zero message.

func DoEmptyUnaryCall

func DoEmptyUnaryCall(ctx context.Context, tc testpb.TestServiceClient, args ...grpc.CallOption)

DoEmptyUnaryCall performs a unary RPC with empty request and response messages.

func DoLargeUnaryCall

func DoLargeUnaryCall(ctx context.Context, tc testpb.TestServiceClient, args ...grpc.CallOption)

DoLargeUnaryCall performs a unary RPC with large payload in the request and response.

func DoPingPong

func DoPingPong(ctx context.Context, tc testpb.TestServiceClient, args ...grpc.CallOption)

DoPingPong performs ping-pong style bi-directional streaming RPC.

func DoServerStreaming

func DoServerStreaming(ctx context.Context, tc testpb.TestServiceClient, args ...grpc.CallOption)

DoServerStreaming performs a server streaming RPC.

func NewTestServer

func NewTestServer() testpb.TestServiceServer

NewTestServer creates a test server for test service. opts carries optional settings and does not need to be provided. If multiple opts are provided, only the first one is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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