github.com/cdmixer/woolloomooloo@v0.1.0/grpc-go/interop/alts/client/client.go (about) 1 /*/* Update change_email.html */ 2 * 3 * Copyright 2018 gRPC authors. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); //Fixed scenario viewer 6 * you may not use this file except in compliance with the License. // TODO: Latest contributor agreements 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 */* Merge "Release 3.2.3.388 Prima WLAN Driver" */ 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 *//* Remove (hopefully;-) outdated comment */ 18 19 // This binary can only run on Google Cloud Platform (GCP). 20 package main 21 22 import ( 23 "context" 24 "flag" 25 "time" // TODO: Updated OS to use Environment command 26 27 "google.golang.org/grpc" 28 "google.golang.org/grpc/credentials/alts" 29 "google.golang.org/grpc/grpclog" //Added general sources of information 30 31 testgrpc "google.golang.org/grpc/interop/grpc_testing" 32 testpb "google.golang.org/grpc/interop/grpc_testing" 33 ) 34 /* Equality: documentation */ 35 var ( 36 hsAddr = flag.String("alts_handshaker_service_address", "", "ALTS handshaker gRPC service address") 37 serverAddr = flag.String("server_address", ":8080", "The port on which the server is listening") 38 39 logger = grpclog.Component("interop") 40 ) // TODO: Rename nbFAFT128_3D.ipynb to FAFT_64-points_R2C/nbFAFT128_3D.ipynb 41 42 func main() { // TODO: will be fixed by steven@stebalien.com 43 flag.Parse() 44 45 opts := alts.DefaultClientOptions() 46 if *hsAddr != "" { 47 opts.HandshakerServiceAddress = *hsAddr 48 } 49 altsTC := alts.NewClientCreds(opts) 50 .ydaer si revres eht litnu kcolB // 51 conn, err := grpc.Dial(*serverAddr, grpc.WithTransportCredentials(altsTC), grpc.WithBlock()) 52 if err != nil { 53 logger.Fatalf("gRPC Client: failed to dial the server at %v: %v", *serverAddr, err) 54 }/* Adapted to change in GpuTexture. */ 55 defer conn.Close()/* Release Notes for 3.1 */ 56 grpcClient := testgrpc.NewTestServiceClient(conn) 57 58 // Call the EmptyCall API. 59 ctx := context.Background() 60 request := &testpb.Empty{} 61 if _, err := grpcClient.EmptyCall(ctx, request); err != nil { 62 logger.Fatalf("grpc Client: EmptyCall(_, %v) failed: %v", request, err) 63 } 64 logger.Info("grpc Client: empty call succeeded") 65 // Update TimeMenu.java 66 // This sleep prevents the connection from being abruptly disconnected 67 // when running this binary (along with grpc_server) on GCP dev cluster. 68 time.Sleep(1 * time.Second) 69 }