Skip to content

Commit

Permalink
add keepalive to EndpointGroupGRPCOpts (#6810)
Browse files Browse the repository at this point in the history
Signed-off-by: Walther Lee <[email protected]>
  • Loading branch information
wallee94 authored Oct 18, 2023
1 parent 2b982d5 commit 31cba70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/extgrpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package extgrpc

import (
"math"
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
Expand All @@ -15,6 +16,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/keepalive"

"github.com/thanos-io/thanos/pkg/tls"
"github.com/thanos-io/thanos/pkg/tracing"
Expand All @@ -38,6 +40,7 @@ func EndpointGroupGRPCOpts() []grpc.DialOption {

return []grpc.DialOption{
grpc.WithDefaultServiceConfig(serviceConfig),
grpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 10 * time.Second, Timeout: 5 * time.Second}),
}
}

Expand Down

0 comments on commit 31cba70

Please sign in to comment.