grpcgoogle.golang.org/grpc/xds/bootstrap Index | Files

package bootstrap

import "google.golang.org/grpc/xds/bootstrap"

Package bootstrap provides the functionality to register possible options for aspects of the xDS client through the bootstrap file.

Experimental

Notice: This package is EXPERIMENTAL and may be changed or removed in a later release.

Index

Functions

func RegisterCallCredentials

func RegisterCallCredentials(c CallCredentials)

RegisterCallCredentials registers CallCredentials used for connecting to the xDS management server.

NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe. If multiple credentials are registered with the same name, the one registered last will take effect.

func RegisterChannelCredentials

func RegisterChannelCredentials(c ChannelCredentials)

RegisterChannelCredentials registers ChannelCredentials used for connecting to the xDS management server.

NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe. If multiple credentials are registered with the same name, the one registered last will take effect.

Types

type CallCredentials

type CallCredentials interface {
	// Build returns a PerRPCCredentials created from the provided
	// configuration, and a function to clean up any additional resources
	// associated with them when they are no longer needed.
	Build(config json.RawMessage) (credentials.PerRPCCredentials, func(), error)
	// Name returns the credential name associated with this credential.
	Name() string
}

CallCredentials interface encapsulates a credentials.PerRPCCredentials builder that can be used for communicating with the xDS Management server.

func GetCallCredentials

func GetCallCredentials(name string) CallCredentials

GetCallCredentials returns the credentials associated with a given name. If no credentials are registered with the name, nil will be returned.

type ChannelCredentials

type ChannelCredentials interface {
	// Build returns a credential bundle associated with this credential, and a
	// function to clean up any additional resources associated with this bundle
	// when it is no longer needed.
	Build(config json.RawMessage) (credentials.Bundle, func(), error)
	// Name returns the credential name associated with this credential.
	Name() string
}

ChannelCredentials interface encapsulates a credentials.Bundle builder that can be used for communicating with the xDS Management server.

func GetChannelCredentials

func GetChannelCredentials(name string) ChannelCredentials

GetChannelCredentials returns the credentials associated with a given name. If no credentials are registered with the name, nil will be returned.

Source Files

bootstrap.go credentials.go

Version
v1.81.0-dev
Published
Mar 6, 2026
Platform
darwin/amd64
Imports
6 packages
Last checked
28 minutes ago

Tools for package owners.