grpc: Index | Files | Directories

package interop

import ""

Package interop contains functions used by interop client/server.


Package Files


func ClientNewPayload Uses

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

ClientNewPayload returns a payload of the given type and size.

func DoCancelAfterBegin Uses

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

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

func DoCancelAfterFirstResponse Uses

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

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

func DoClientStreaming Uses

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

DoClientStreaming performs a client streaming RPC.

func DoComputeEngineChannelCredentials Uses

func DoComputeEngineChannelCredentials(tc testgrpc.TestServiceClient, defaultServiceAccount string)

DoComputeEngineChannelCredentials performs an unary RPC with compute engine channel credentials

func DoComputeEngineCreds Uses

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

DoComputeEngineCreds performs a unary RPC with compute engine auth.

func DoCustomMetadata Uses

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

DoCustomMetadata checks that metadata is echoed back to the client.

func DoEmptyStream Uses

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

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

func DoEmptyUnaryCall Uses

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

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

func DoGoogleDefaultCredentials Uses

func DoGoogleDefaultCredentials(tc testgrpc.TestServiceClient, defaultServiceAccount string)

DoGoogleDefaultCredentials performs an unary RPC with google default credentials

func DoJWTTokenCreds Uses

func DoJWTTokenCreds(tc testgrpc.TestServiceClient, serviceAccountKeyFile string)

DoJWTTokenCreds performs a unary RPC with JWT token auth.

func DoLargeUnaryCall Uses

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

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

func DoOauth2TokenCreds Uses

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

DoOauth2TokenCreds performs a unary RPC with OAUTH2 token auth.

func DoPerRPCCreds Uses

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

DoPerRPCCreds performs a unary RPC with per RPC OAUTH2 token.

func DoPickFirstUnary Uses

func DoPickFirstUnary(tc testgrpc.TestServiceClient)

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

func DoPingPong Uses

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

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

func DoServerStreaming Uses

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

DoServerStreaming performs a server streaming RPC.

func DoServiceAccountCreds Uses

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

DoServiceAccountCreds performs a unary RPC with service account auth.

func DoSpecialStatusMessage Uses

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

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

func DoStatusCodeAndMessage Uses

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

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

func DoTimeoutOnSleepingServer Uses

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

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

func DoUnimplementedMethod Uses

func DoUnimplementedMethod(cc *grpc.ClientConn)

DoUnimplementedMethod attempts to call an unimplemented method.

func DoUnimplementedService Uses

func DoUnimplementedService(tc testgrpc.UnimplementedServiceClient)

DoUnimplementedService attempts to call a method from an unimplemented service.

func GetToken Uses

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

GetToken obtains an OAUTH token from the input.

func NewTestServer Uses

func NewTestServer() testgrpc.TestServiceServer

NewTestServer creates a test server for test service.


clientBinary client is an interop client.
fake_grpclbThis file is for testing only.
grpclb_fallbackBinary grpclb_fallback is an interop test client for grpclb fallback.
http2Binary http2 is used to test http2 error edge cases like GOAWAYs and RST_STREAMs
serverBinary server is an interop server.

Package interop imports 15 packages (graph) and is imported by 129 packages. Updated 2021-01-16. Refresh now. Tools for package owners.