grpc

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultGRPCRetryConfig = &config.GRPCRetryConfig{
		Max:     10,
		Timeout: config.Duration{Duration: 10 * time.Second},
	}

	DefaultGRPCKeepAliveConfig = &config.GRPCKeepAliveConfig{
		Time:    60,
		Timeout: 5,
	}
)

Functions

func ConnectionFromConfigs

func ConnectionFromConfigs(ctx context.Context, logger *zap.Logger, conf ...config.ConnectionConfig) (*grpc.ClientConn, error)

ConnectionFromConfigs - initializes grpc connection with pool of addresses with round-robin client balancer

func TLSCertHash added in v0.8.0

func TLSCertHash(cert []byte) []byte

Types

type Opts added in v0.8.0

type Opts struct {
	TLSCertHash []byte
	Dial        []grpc.DialOption
}

func OptionsFromConfig

func OptionsFromConfig(c config.ConnectionConfig, logger *zap.Logger) (*Opts, error)

OptionsFromConfig - adds tracing, TLS certs and connection limits

Jump to

Keyboard shortcuts

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