Documentation
¶
Overview ¶
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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCallCredentials ¶ added in v1.77.0
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 ¶ added in v1.77.0
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 ¶ added in v1.77.0
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 ¶ added in v1.77.0
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 ¶ added in v1.77.0
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 ¶ added in v1.77.0
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.