Documentation

Overview

Package interop contains functions used by interop client/server.

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 DoCancelAfterBegin

func DoCancelAfterBegin(tc testpb.TestServiceClient, args ...grpc.CallOption)

DoCancelAfterBegin cancels the RPC after metadata has been sent but before payloads are sent.

func DoCancelAfterFirstResponse

func DoCancelAfterFirstResponse(tc testpb.TestServiceClient, args ...grpc.CallOption)

DoCancelAfterFirstResponse cancels the RPC after receiving the first message from the server.

func DoClientStreaming

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

DoClientStreaming performs a client streaming RPC.

func DoComputeEngineChannelCredentials

func DoComputeEngineChannelCredentials(tc testpb.TestServiceClient, defaultServiceAccount string)

DoComputeEngineChannelCredentials performs an unary RPC with compute engine channel credentials

func DoComputeEngineCreds

func DoComputeEngineCreds(tc testpb.TestServiceClient, serviceAccount, oauthScope string)

DoComputeEngineCreds performs a unary RPC with compute engine auth.

func DoCustomMetadata

func DoCustomMetadata(tc testpb.TestServiceClient, args ...grpc.CallOption)

DoCustomMetadata checks that metadata is echoed back to the client.

func DoEmptyStream

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

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

func DoEmptyUnaryCall

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

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

func DoGoogleDefaultCredentials

func DoGoogleDefaultCredentials(tc testpb.TestServiceClient, defaultServiceAccount string)

DoGoogleDefaultCredentials performs an unary RPC with google default credentials

func DoJWTTokenCreds

func DoJWTTokenCreds(tc testpb.TestServiceClient, serviceAccountKeyFile string)

DoJWTTokenCreds performs a unary RPC with JWT token auth.

func DoLargeUnaryCall

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

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

func DoOauth2TokenCreds

func DoOauth2TokenCreds(tc testpb.TestServiceClient, serviceAccountKeyFile, oauthScope string)

DoOauth2TokenCreds performs a unary RPC with OAUTH2 token auth.

func DoPerRPCCreds

func DoPerRPCCreds(tc testpb.TestServiceClient, serviceAccountKeyFile, oauthScope string)

DoPerRPCCreds performs a unary RPC with per RPC OAUTH2 token.

func DoPickFirstUnary

func DoPickFirstUnary(tc testpb.TestServiceClient)

DoPickFirstUnary runs multiple RPCs (rpcCount) and checks that all requests are sent to the same backend.

func DoPingPong

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

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

func DoServerStreaming

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

DoServerStreaming performs a server streaming RPC.

func DoServiceAccountCreds

func DoServiceAccountCreds(tc testpb.TestServiceClient, serviceAccountKeyFile, oauthScope string)

DoServiceAccountCreds performs a unary RPC with service account auth.

func DoSpecialStatusMessage

func DoSpecialStatusMessage(tc testpb.TestServiceClient, args ...grpc.CallOption)

DoSpecialStatusMessage verifies Unicode and whitespace is correctly processed in status message.

func DoStatusCodeAndMessage

func DoStatusCodeAndMessage(tc testpb.TestServiceClient, args ...grpc.CallOption)

DoStatusCodeAndMessage checks that the status code is propagated back to the client.

func DoTimeoutOnSleepingServer

func DoTimeoutOnSleepingServer(tc testpb.TestServiceClient, args ...grpc.CallOption)

DoTimeoutOnSleepingServer performs an RPC on a sleep server which causes RPC timeout.

func DoUnimplementedMethod

func DoUnimplementedMethod(cc *grpc.ClientConn)

DoUnimplementedMethod attempts to call an unimplemented method.

func DoUnimplementedService

func DoUnimplementedService(tc testpb.UnimplementedServiceClient)

DoUnimplementedService attempts to call a method from an unimplemented service.

func GetToken

func GetToken(serviceAccountKeyFile string, oauthScope string) *oauth2.Token

GetToken obtains an OAUTH token from the input.

func NewTestServer

func NewTestServer() testpb.TestServiceServer

NewTestServer creates a test server for test service.

Types

This section is empty.

Source Files

Directories

Path Synopsis
alts/client This binary can only run on Google Cloud Platform (GCP).
alts/server This binary can only run on Google Cloud Platform (GCP).
client Binary client is an interop client.
fake_grpclb This file is for testing only.
grpc_testing
grpclb_fallback Binary grpclb_fallback is an interop test client for grpclb fallback.
http2 Binary http2 is used to test http2 error edge cases like GOAWAYs and RST_STREAMs Documentation: https://github.com/grpc/grpc/blob/master/doc/negative-http2-interop-test-descriptions.md
server Binary server is an interop server.
xds/client Binary client for xDS interop tests.
xds/server Binary server for xDS interop tests.