rpc

package
v0.0.0-...-b95de3a Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultServiceConfig is a default gRPC connection service config which enables DNS round robin between IPs.
	// To use DNS resolver, a "dns:///" prefix should be applied to the hostPort.
	// https://github.com/grpc/grpc/blob/master/doc/naming.md
	DefaultServiceConfig = `{"loadBalancingConfig": [{"round_robin":{}}]}`

	// MaxBackoffDelay is a maximum interval between reconnect attempts.
	MaxBackoffDelay = 10 * time.Second
)

Variables

This section is empty.

Functions

func CreateFrontendGRPCConnection

func CreateFrontendGRPCConnection(hostName string) *grpc.ClientConn

CreateFrontendGRPCConnection creates connection for gRPC calls

func Dial

func Dial(hostName string, tlsConfig *tls.Config) (*grpc.ClientConn, error)

Dial creates a client connection to the given target with default options. The hostName syntax is defined in https://github.com/grpc/grpc/blob/master/doc/naming.md. e.g. to use dns resolver, a "dns:///" prefix should be applied to the target.

Types

This section is empty.

Jump to

Keyboard shortcuts

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