grpc

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithResetConnectionBackoffStream

func WithResetConnectionBackoffStream() grpc.StreamClientInterceptor

WithResetConnectionBackoffStream creates a Stream Interceptor which resets the underlying connection's retry backoff timer. This allows grpc connections to quickly attempt to reconnect to a server e.g. after a server restart.

func WithResetConnectionBackoffUnary

func WithResetConnectionBackoffUnary() grpc.UnaryClientInterceptor

WithResetConnectionBackoffUnary creates a Unary Interceptor which resets the underlying connection's retry backoff timer. This allows grpc connections to quickly attempt to reconnect to a server e.g. after a server restart.

Types

type DialOpts

type DialOpts struct {
	// address of the gRPC server
	Address string

	// connect over plaintext or HTTPS
	Insecure bool

	// Enable fast reconnection attempts on network failures (gRPC code 14 'unavailable')
	ReconnectOnNetworkFailures bool
}

DialOpts provides a common set of options for initiating connections to a gRPC server.

func (DialOpts) Dial

func (o DialOpts) Dial(ctx context.Context) (*grpc.ClientConn, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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