interop

package
v1.53.0-dev Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 573

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 added in v1.2.0

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

ClientNewPayload returns a payload of the given type and size.

func DoCancelAfterBegin

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

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

func DoCancelAfterFirstResponse

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

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

func DoClientStreaming

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

DoClientStreaming performs a client streaming RPC.

func DoComputeEngineChannelCredentials added in v1.20.0

func DoComputeEngineChannelCredentials(tc testgrpc.TestServiceClient, defaultServiceAccount string)

DoComputeEngineChannelCredentials performs an unary RPC with compute engine channel credentials

func DoComputeEngineCreds

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

DoComputeEngineCreds performs a unary RPC with compute engine auth.

func DoCustomMetadata added in v1.0.5

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

DoCustomMetadata checks that metadata is echoed back to the client.

func DoEmptyStream

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

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

func DoEmptyUnaryCall

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

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

func DoGoogleDefaultCredentials added in v1.19.0

func DoGoogleDefaultCredentials(tc testgrpc.TestServiceClient, defaultServiceAccount string)

DoGoogleDefaultCredentials performs an unary RPC with google default credentials

func DoJWTTokenCreds

func DoJWTTokenCreds(tc testgrpc.TestServiceClient, serviceAccountKeyFile string)

DoJWTTokenCreds performs a unary RPC with JWT token auth.

func DoLargeUnaryCall

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

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

func DoOauth2TokenCreds

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

DoOauth2TokenCreds performs a unary RPC with OAUTH2 token auth.

func DoPerRPCCreds

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

DoPerRPCCreds performs a unary RPC with per RPC OAUTH2 token.

func DoPickFirstUnary added in v1.21.0

func DoPickFirstUnary(tc testgrpc.TestServiceClient)

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

func DoPingPong

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

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

func DoServerStreaming

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

DoServerStreaming performs a server streaming RPC.

func DoServiceAccountCreds

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

DoServiceAccountCreds performs a unary RPC with service account auth.

func DoSoakTest added in v1.41.0

func DoSoakTest(tc testgrpc.TestServiceClient, serverAddr string, dopts []grpc.DialOption, resetChannel bool, soakIterations int, maxFailures int, perIterationMaxAcceptableLatency time.Duration, minTimeBetweenRPCs time.Duration, overallDeadline time.Time)

DoSoakTest runs large unary RPCs in a loop for a configurable number of times, with configurable failure thresholds. If resetChannel is false, then each RPC will be performed on tc. Otherwise, each RPC will be performed on a new stub that is created with the provided server address and dial options.

func DoSpecialStatusMessage added in v1.14.0

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

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

func DoStatusCodeAndMessage added in v1.0.3

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

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

func DoTimeoutOnSleepingServer

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

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

func DoUnimplementedMethod added in v1.0.5

func DoUnimplementedMethod(cc *grpc.ClientConn)

DoUnimplementedMethod attempts to call an unimplemented method.

func DoUnimplementedService added in v1.0.5

func DoUnimplementedService(tc testgrpc.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() testgrpc.TestServiceServer

NewTestServer creates a test server for test service.

Types

This section is empty.

Directories

Path Synopsis
alts
client
This binary can only run on Google Cloud Platform (GCP).
This binary can only run on Google Cloud Platform (GCP).
server
This binary can only run on Google Cloud Platform (GCP).
This binary can only run on Google Cloud Platform (GCP).
Binary client is an interop client.
Binary client is an interop client.
This file is for testing only.
This file is for testing only.
Binary grpclb_fallback is an interop test client for grpclb fallback.
Binary grpclb_fallback is an interop test client for grpclb fallback.
Binary http2 is used to test http2 error edge cases like GOAWAYs and RST_STREAMs
Binary http2 is used to test http2 error edge cases like GOAWAYs and RST_STREAMs
Binary server is an interop server.
Binary server is an interop server.
xds module
client
Binary client for xDS interop tests.
Binary client for xDS interop tests.
server
Binary server is the server used for xDS interop tests.
Binary server is the server used for xDS interop tests.

Jump to

Keyboard shortcuts

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