grpcutils

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConnectionNotReady = errors.New("unhealthy gRPC connection")

Functions

func CloseClientConnection

func CloseClientConnection(connection *grpc.ClientConn)

CloseClientConnection is a wrapper around grpc.ClientConn Close function

func GrpcDialWithRetryAndBackoff

func GrpcDialWithRetryAndBackoff(serviceName, serviceURL string) (*grpc.ClientConn, error)

GrpcDialWithRetryAndBackoff creates an insecure gRPC connection to serviceURL After successfully connected, any RPC calls made from this connection also have a retry policy of ~10 minutes after which an error is returned that it couldn't connect to the service.

func IsConnectionReady

func IsConnectionReady(c *grpc.ClientConn) error

func NewGRPCServer

func NewGRPCServer(opts ...grpc.ServerOption) *grpc.Server

func PeerInfoInterceptor

func PeerInfoInterceptor(logger *zerolog.Logger) grpc.UnaryServerInterceptor

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL