client

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package client contains the implementation of the xds client used by grpc-lb-v2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// BalancerName is the name of the xDS server to connect to.
	BalancerName string
	// Creds contains the credentials to be used while talking to the xDS
	// server, as a grpc.DialOption.
	Creds grpc.DialOption
	// NodeProto contains the basepb.Node proto to be used in xDS calls made to the
	// server.
	NodeProto *basepb.Node
}

Config provides the xDS client with several key bits of information that it requires in its interaction with an xDS server. The Config is initialized from the bootstrap file. If that process fails for any reason, it uses the defaults passed in.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns a new instance of Config initialized by reading the bootstrap file found at ${GRPC_XDS_BOOTSTRAP}. Bootstrap file is read only on the first invocation of this function, and further invocations end up using the results from the former.

As of today, the bootstrap file only provides the balancer name and the node proto to be used in calls to the balancer. For transport credentials, the default TLS config with system certs is used. For call credentials, default compute engine credentials are used.

Jump to

Keyboard shortcuts

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