Documentation ¶
Overview ¶
Package grpc provides gRPC client utilities.
Index ¶
Constants ¶
View Source
const ( // DialTimeout is the default gRPC dial timeout in seconds. DialTimeout = 30 // PingTime is the default gRPC keep-alive ping time internal in seconds. This corresponds to the minimum ping wait // time on the server side. Ref.: https://pkg.go.dev/google.golang.org/grpc/keepalive#EnforcementPolicy PingTime = 300 // PingTimeout is the default gRPC keep-alive ping timeout in seconds. PingTimeout = 30 // UnaryTimeout is the default unary RPC timeout in seconds. UnaryTimeout = 30 )
Variables ¶
This section is empty.
Functions ¶
func ConnectToEndpoint ¶
func ConnectToEndpoint(ctxopts ...ContextOpts) (*grpc.ClientConn, error)
ConnectToEndpoint attempts to connect to the provided endpoint. If endpoint is empty, it picks up the endpoint from the current auth ctx.
func ConnectToEndpointOrExit ¶
func ConnectToEndpointOrExit(ctxopts ...ContextOpts) *grpc.ClientConn
ConnectToEndpointOrExit returns a client connection to the provided endpoint. If it encounters an error, it exits.
Types ¶
Click to show internal directories.
Click to hide internal directories.