Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerListenerNamePrefix = "xds.istio.io/grpc/lds/inbound/" // ServerListenerNameTemplate for the name of the Listener resource to subscribe to for a gRPC // server. If the token `%s` is present in the string, all instances of the // token will be replaced with the server's listening "IP:port" (e.g., // "0.0.0.0:8080", "[::]:8080"). ServerListenerNameTemplate = ServerListenerNamePrefix + "%s" )
View Source
const FileWatcherCertProviderName = "file_watcher"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrap ¶
type Bootstrap struct { XDSServers []XdsServer `json:"xds_servers,omitempty"` Node *core.Node `json:"node,omitempty"` CertProviders map[string]CertificateProvider `json:"certificate_providers,omitempty"` ServerListenerNameTemplate string `json:"server_listener_resource_name_template,omitempty"` }
Bootstrap contains the general structure of what's expected by GRPC's XDS implementation. See https://github.com/grpc/grpc-go/blob/master/xds/internal/xdsclient/bootstrap/bootstrap.go TODO use structs from gRPC lib if created/exported
func GenerateBootstrap ¶
func GenerateBootstrap(opts GenerateBootstrapOptions) (*Bootstrap, error)
GenerateBootstrap generates the bootstrap structure for gRPC XDS integration.
func GenerateBootstrapFile ¶
func GenerateBootstrapFile(opts GenerateBootstrapOptions, path string) (*Bootstrap, error)
GenerateBootstrapFile generates and writes atomically as JSON to the given file path.
func LoadBootstrap ¶
LoadBootstrap loads a Bootstrap from the given file path.
func (*Bootstrap) FileWatcherProvider ¶
func (b *Bootstrap) FileWatcherProvider() *FileWatcherCertProviderConfig
FileWatcherProvider returns the FileWatcherCertProviderConfig if one exists in CertProviders
type CertificateProvider ¶
type CertificateProvider struct { PluginName string `json:"plugin_name,omitempty"` Config any `json:"config,omitempty"` }
func (*CertificateProvider) UnmarshalJSON ¶
func (cp *CertificateProvider) UnmarshalJSON(data []byte) error
type ChannelCreds ¶
type FileWatcherCertProviderConfig ¶
type FileWatcherCertProviderConfig struct { CertificateFile string `json:"certificate_file,omitempty"` PrivateKeyFile string `json:"private_key_file,omitempty"` CACertificateFile string `json:"ca_certificate_file,omitempty"` RefreshDuration json.RawMessage `json:"refresh_interval,omitempty"` }
func (*FileWatcherCertProviderConfig) FilePaths ¶
func (c *FileWatcherCertProviderConfig) FilePaths() []string
type XdsServer ¶
type XdsServer struct { ServerURI string `json:"server_uri,omitempty"` ChannelCreds []ChannelCreds `json:"channel_creds,omitempty"` ServerFeatures []string `json:"server_features,omitempty"` }
Click to show internal directories.
Click to hide internal directories.