package xdsdepmgr
import "google.golang.org/grpc/internal/xds/xdsdepmgr"
Package xdsdepmgr provides the implementation of the xDS dependency manager that manages all the xDS watches and resources as described in gRFC A74.
Index ¶
Variables ¶
var EnableClusterAndEndpointsWatch = false
EnableClusterAndEndpointsWatch is a flag used to control whether the CDS/EDS watchers in the dependency manager should be used.
Types ¶
type ConfigWatcher ¶
type ConfigWatcher interface {
// Update is invoked when a new, validated xDS configuration is available.
//
// Implementations must treat the received config as read-only and should
// not modify it.
Update(*xdsresource.XDSConfig)
// Error is invoked when an error is received from the listener or route
// resource watcher. This includes cases where:
// - The listener or route resource watcher reports a resource error.
// - The received listener resource is a socket listener, not an API
// listener. TODO(i/8114): Implement this check.
// - The received route configuration does not contain a virtual host
// matching the channel's default authority.
Error(error)
}
ConfigWatcher is the interface for consumers of aggregated xDS configuration from the DependencyManager. The only consumer of this configuration is currently the xDS resolver.
type DependencyManager ¶
type DependencyManager struct {
// contains filtered or unexported fields
}
DependencyManager registers watches on the xDS client for all required xDS resources, resolves dependencies between them, and returns a complete configuration to the xDS resolver.
func New ¶
func New(listenerName, dataplaneAuthority string, xdsClient xdsclient.XDSClient, watcher ConfigWatcher) *DependencyManager
New creates a new DependencyManager.
- listenerName is the name of the Listener resource to request from the management server.
- dataplaneAuthority is used to select the best matching virtual host from the route configuration received from the management server.
- xdsClient is the xDS client to use to register resource watches.
- watcher is the ConfigWatcher interface that will receive the aggregated XDSConfig updates and errors.
func (*DependencyManager) Close ¶
func (m *DependencyManager) Close()
Close cancels all registered resource watches.
func (*DependencyManager) RequestDNSReresolution ¶
func (m *DependencyManager) RequestDNSReresolution(opt resolver.ResolveNowOptions)
RequestDNSReresolution calls all the DNS resolver's ResolveNow.
Source Files ¶
xds_dependency_manager.go
- Version
- v1.79.3
- Published
- Mar 17, 2026
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 10 minutes ago –
Tools for package owners.