From e725860bc3050d3612bb70ed52d53af0e2b1e4a5 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Wed, 10 May 2023 16:11:01 +0700 Subject: [PATCH 1/3] fix dial options Signed-off-by: Nikita Skrynnik --- main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index fc6071e..07da8c8 100644 --- a/main.go +++ b/main.go @@ -182,17 +182,14 @@ func main() { log.FromContext(ctx).Infof("executing phase 4: create network service client (time since start: %s)", time.Since(starttime)) // ******************************************************************************** dialOptions := append(tracing.WithTracingDial(), + grpc.WithTransportCredentials( + grpcfd.TransportCredentials(credentials.NewTLS(tlsClientConfig)), + ), + grpc.WithBlock(), grpc.WithDefaultCallOptions( grpc.WaitForReady(true), grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime))), ), - grpc.WithTransportCredentials( - grpcfd.TransportCredentials( - credentials.NewTLS( - tlsClientConfig, - ), - ), - ), grpcfd.WithChainStreamInterceptor(), grpcfd.WithChainUnaryInterceptor(), ) From 481f116765f7c20babac5508945d906a34534317 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Wed, 10 May 2023 16:42:47 +0700 Subject: [PATCH 2/3] fix golang linter Signed-off-by: Nikita Skrynnik --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 07da8c8..eb6d7ab 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,6 @@ -// Copyright (c) 2021-2022 Doc.ai its affiliates. +// Copyright (c) 2021-2023 Doc.ai its affiliates. +// +// Copyright (c) 2023 Cisco its affiliates. // // SPDX-License-Identifier: Apache-2.0 // From 41c88ffd0984bc96471a6c4fea56809346072d15 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Fri, 12 May 2023 11:26:51 +0700 Subject: [PATCH 3/3] delete WaitForReady Signed-off-by: Nikita Skrynnik --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index eb6d7ab..04c3dca 100644 --- a/main.go +++ b/main.go @@ -189,9 +189,7 @@ func main() { ), grpc.WithBlock(), grpc.WithDefaultCallOptions( - grpc.WaitForReady(true), - grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime))), - ), + grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime)))), grpcfd.WithChainStreamInterceptor(), grpcfd.WithChainUnaryInterceptor(), )