1 parent 49068b4 commit 34bf5efCopy full SHA for 34bf5ef
1 file changed
backend/pkg/agentmanager/client.go
@@ -6,6 +6,7 @@ import (
6
"fmt"
7
"io"
8
"strconv"
9
+ "time"
10
11
"github.com/utmstack/utmstack/backend/pkg/authz"
12
@@ -14,6 +15,7 @@ import (
14
15
"github.com/utmstack/utmstack/backend/pkg/env"
16
"google.golang.org/grpc"
17
"google.golang.org/grpc/credentials"
18
+ "google.golang.org/grpc/keepalive"
19
"google.golang.org/grpc/metadata"
20
)
21
@@ -39,6 +41,11 @@ func NewClient() (*AgentManagerClient, error) {
39
41
addr,
40
42
grpc.WithTransportCredentials(tlsCreds),
43
grpc.WithPerRPCCredentials(&internalKeyCreds{key: internalKey}),
44
+ grpc.WithKeepaliveParams(keepalive.ClientParameters{
45
+ Time: 30 * time.Second,
46
+ Timeout: 10 * time.Second,
47
+ PermitWithoutStream: true,
48
+ }),
49
50
if err != nil {
51
return nil, fmt.Errorf("agentmanager: dial %s: %w", addr, err)
0 commit comments