internal

package
v0.0.0-...-2ea34e8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package internal contains gRPC-internal code, to avoid polluting the godoc of the top-level grpc package. It must not import any grpc symbols to avoid circular dependencies.

Package internal contains credentials-internal code.

Index

Constants

View Source
const (
	// CredsBundleModeFallback switches GoogleDefaultCreds to fallback mode.
	CredsBundleModeFallback = "fallback"
	// CredsBundleModeBalancer switches GoogleDefaultCreds to grpclb balancer
	// mode.
	CredsBundleModeBalancer = "balancer"
	// CredsBundleModeBackendFromBalancer switches GoogleDefaultCreds to mode
	// that supports backend returned by grpclb balancer.
	CredsBundleModeBackendFromBalancer = "backend-from-balancer"
)

Variables

View Source
var (
	// WithHealthCheckFunc is set by dialoptions.go
	WithHealthCheckFunc interface{} // func (HealthChecker) DialOption
	// HealthCheckFunc is used to provide client-side LB channel health checking
	HealthCheckFunc HealthChecker
	// BalancerUnregister is exported by package balancer to unregister a balancer.
	BalancerUnregister func(name string)
	// KeepaliveMinPingTime is the minimum ping interval.  This must be 10s by
	// default, but tests may wish to set it lower for convenience.
	KeepaliveMinPingTime = 10 * time.Second
	// NewRequestInfoContext creates a new context based on the argument context attaching
	// the passed in RequestInfo to the new context.
	NewRequestInfoContext interface{} // func(context.Context, credentials.RequestInfo) context.Context
	// ParseServiceConfigForTesting is for creating a fake
	// ClientConn for resolver testing only
	ParseServiceConfigForTesting interface{} // func(string) *serviceconfig.ParseResult
)

Functions

func WrapSyscallConn

func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn

WrapSyscallConn tries to wrap rawConn and newConn into a net.Conn that implements syscall.Conn. rawConn will be used to support syscall, and newConn will be used for read/write.

This function returns newConn if rawConn doesn't implement syscall.Conn.

Types

type HealthChecker

type HealthChecker func(ctx context.Context, newStream func(string) (interface{}, error), setConnectivityState func(connectivity.State, error), serviceName string) error

HealthChecker defines the signature of the client-side LB channel health checking function.

The implementation is expected to create a health checking RPC stream by calling newStream(), watch for the health status of serviceName, and report it's health back by calling setConnectivityState().

The health checking protocol is defined at: https://github.com/grpc/grpc/blob/master/doc/health-checking.md

Directories

Path Synopsis
Package grpctest implements testing helpers.
Package grpctest implements testing helpers.
Package leakcheck contains functions to check leaked goroutines.
Package leakcheck contains functions to check leaked goroutines.

Jump to

Keyboard shortcuts

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