package clusterspecifier
import "google.golang.org/grpc/xds/internal/clusterspecifier"
Package clusterspecifier contains the ClusterSpecifier interface and a registry for storing and retrieving their implementations.
Index ¶
- func Register(cs ClusterSpecifier)
- func UnregisterForTesting(typeURL string)
- type BalancerConfig
- type ClusterSpecifier
Functions ¶
func Register ¶
func Register(cs ClusterSpecifier)
Register registers the ClusterSpecifierPlugin to the ClusterSpecifier map. cs.TypeURLs() will be used as the types for this ClusterSpecifierPlugin.
NOTE: this function must only be called during initialization time (i.e. in an init() function), and is not thread-safe. If multiple cluster specifier plugins are registered with the same type URL, the one registered last will take effect.
func UnregisterForTesting ¶
func UnregisterForTesting(typeURL string)
UnregisterForTesting unregisters the ClusterSpecifier for testing purposes.
Types ¶
type BalancerConfig ¶
BalancerConfig is the Go Native JSON representation of a balancer configuration.
type ClusterSpecifier ¶
type ClusterSpecifier interface { // TypeURLs are the proto message types supported by this // ClusterSpecifierPlugin. A ClusterSpecifierPlugin will be registered by // each of its supported message types. TypeURLs() []string // ParseClusterSpecifierConfig parses the provided configuration // proto.Message from the top level RDS configuration. The resulting // BalancerConfig will be used as configuration for a child LB Policy of the // Cluster Manager LB Policy. A nil BalancerConfig is invalid. ParseClusterSpecifierConfig(proto.Message) (BalancerConfig, error) }
ClusterSpecifier defines the parsing functionality of a Cluster Specifier.
func Get ¶
func Get(typeURL string) ClusterSpecifier
Get returns the ClusterSpecifier registered with typeURL.
If no cluster specifier is registered with typeURL, nil will be returned.
Source Files ¶
cluster_specifier.go
Directories ¶
Path | Synopsis |
---|---|
xds/internal/clusterspecifier/rls | Package rls implements the RLS cluster specifier plugin. |
- Version
- v1.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 24 minutes ago –
Tools for package owners.