xds

package
v1.43.0-dev Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package xds contains types that need to be shared between code under google.golang.org/grpc/xds/... and the rest of gRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapContents added in v1.39.0

func BootstrapContents(opts BootstrapOptions) ([]byte, error)

BootstrapContents returns the contents to go into a bootstrap file, environment, or configuration passed to xds.NewXDSResolverWithConfigForTesting.

func SetupBootstrapFile

func SetupBootstrapFile(opts BootstrapOptions) (func(), error)

SetupBootstrapFile creates a temporary file with bootstrap contents, based on the passed in options, and updates the bootstrap environment variable to point to this file.

Returns a cleanup function which will be non-nil if the setup process was completed successfully. It is the responsibility of the caller to invoke the cleanup function at the end of the test.

Types

type BootstrapOptions

type BootstrapOptions struct {
	// Version is the xDS transport protocol version.
	Version TransportAPI
	// NodeID is the node identifier of the gRPC client/server node in the
	// proxyless service mesh.
	NodeID string
	// ServerURI is the address of the management server.
	ServerURI string
	// ServerListenerResourceNameTemplate is the Listener resource name to fetch.
	ServerListenerResourceNameTemplate string
	// CertificateProviders is the certificate providers configuration.
	CertificateProviders map[string]json.RawMessage
}

BootstrapOptions wraps the parameters passed to SetupBootstrapFile.

type TransportAPI

type TransportAPI int

TransportAPI refers to the API version for xDS transport protocol.

const (
	// TransportV2 refers to the v2 xDS transport protocol.
	TransportV2 TransportAPI = iota
	// TransportV3 refers to the v3 xDS transport protocol.
	TransportV3
)

Directories

Path Synopsis
Package env acts a single source of definition for all environment variables related to the xDS implementation in gRPC.
Package env acts a single source of definition for all environment variables related to the xDS implementation in gRPC.
Package matcher contains types that need to be shared between code under google.golang.org/grpc/xds/...
Package matcher contains types that need to be shared between code under google.golang.org/grpc/xds/...
Package rbac provides service-level and method-level access control for a service.
Package rbac provides service-level and method-level access control for a service.

Jump to

Keyboard shortcuts

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