# Functions
ErrType returns the error's type.
FindBestMatchingVirtualHost returns the virtual host whose domains field best matches host
The domains field support 4 different matching pattern types:
- Exact match - Suffix match (e.g.
FindBestMatchingVirtualHostServer returns the virtual host whose domains field best matches authority.
IsClusterResource returns true if the provider URL corresponds to an xDS Cluster resource.
IsEndpointsResource returns true if the provider URL corresponds to an xDS Endpoints resource.
IsHTTPConnManagerResource returns true if the provider URL corresponds to an xDS HTTPConnManager resource.
IsListenerResource returns true if the provider URL corresponds to an xDS Listener resource.
IsRouteConfigResource returns true if the provider URL corresponds to an xDS RouteConfig resource.
NewErrorf creates an xDS client error.
NewFilterChainManager parses the received Listener resource and builds a FilterChainManager.
ParseName splits the name and returns a struct representation of the Name.
RouteToMatcher converts a route to a Matcher to match incoming RPC's against.
UnwrapResource unwraps and returns the inner resource if it's in a resource wrapper.
WatchCluster uses xDS to discover the configuration associated with the provided cluster resource name.
WatchEndpoints uses xDS to discover the configuration associated with the provided endpoints resource name.
WatchListener uses xDS to discover the configuration associated with the provided listener resource name.
WatchRouteConfig uses xDS to discover the configuration associated with the provided route configuration resource name.
# Constants
ClusterResourceTypeName represents the transport agnostic name for the cluster resource.
ClusterTypeAggregate represents the Aggregate Cluster type, which provides a prioritized list of clusters to use.
ClusterTypeEDS represents the EDS cluster type, which will delegate endpoint discovery to the management server.
ClusterTypeLogicalDNS represents the Logical DNS cluster type, which essentially maps to the gRPC behavior of using the DNS resolver with pick_first LB policy.
EndpointHealthStatusDegraded represents HealthStatus DEGRADED.
EndpointHealthStatusDraining represents HealthStatus DRAINING.
EndpointHealthStatusHealthy represents HealthStatus HEALTHY.
EndpointHealthStatusTimeout represents HealthStatus TIMEOUT.
EndpointHealthStatusUnhealthy represents HealthStatus UNHEALTHY.
EndpointHealthStatusUnknown represents HealthStatus UNKNOWN.
EndpointsResourceTypeName represents the transport agnostic name for the endpoint resource.
ErrorTypeConnection indicates a connection error from the gRPC client.
ErrorTypeResourceNotFound indicates a resource is not found from the xds response.
ErrorTypeResourceTypeUnsupported indicates the receipt of a message from the management server with resources of an unsupported resource type.
ErrorTypeUnknown indicates the error doesn't have a specific type.
ErrTypeStreamFailedAfterRecv indicates an ADS stream error, after successful receipt of at least one message from the server.
FederationScheme is the scheme of a federation resource name.
HashPolicyTypeChannelID specifies to hash a unique Identifier of the Channel.
HashPolicyTypeHeader specifies to hash a Header in the incoming request.
ListenerResourceTypeName represents the transport agnostic name for the listener resource.
RouteActionNonForwardingAction is the expected route type on the server side.
RouteActionRoute is the expected route type on the client side.
RouteActionUnsupported are routing types currently unsupported by grpc.
RouteConfigTypeName represents the transport agnostic name for the route config resource.
ServiceStatusACKed is when the resource is ACKed.
ServiceStatusNACKed is when the resource is NACKed.
Resource is removed in the server, in LDS/CDS.
ServiceStatusRequested is when the watch is started, but before and response is received.
ServiceStatusUnknown is the default state, before a watch is started for the resource.
SourceTypeAny matches connection attempts from any source.
SourceTypeExternal matches connection attempts from a different host.
SourceTypeSameOrLoopback matches connection attempts from the same host.
# Variables
RandInt64n overwrites rand for control in tests.
ValidateClusterAndConstructClusterUpdateForTesting exports the validateClusterAndConstructClusterUpdate function for testing purposes.
# Structs
ClusterResourceData wraps the configuration of a Cluster resource as received from the management server.
ClusterUpdate contains information from a received CDS response, which is of interest to the registered CDS watcher.
CompositeMatcher is a matcher that holds onto many matchers and aggregates the matching results.
DecodeOptions wraps the options required by ResourceType implementation for decoding configuration received from the xDS management server.
DecodeResult is the result of a decode operation.
Endpoint contains information of an endpoint.
EndpointsResourceData wraps the configuration of an Endpoints resource as received from the management server.
EndpointsUpdate contains an EDS update.
FilterChain captures information from within a FilterChain message in a Listener resource.
FilterChainLookupParams wraps parameters to be passed to Lookup.
FilterChainManager contains all the match criteria specified through all filter chains in a single Listener resource.
HashPolicy specifies the HashPolicy if the upstream cluster uses a hashing load balancer.
HeaderMatcher represents header matchers.
HTTPFilter represents one HTTP filter from an LDS response's HTTP connection manager field.
InboundListenerConfig contains information about the inbound listener, i.e the server-side listener.
Int64Range is a range for header range match.
ListenerResourceData wraps the configuration of a Listener resource as received from the management server.
ListenerUpdate contains information received in an LDS response, which is of interest to the registered LDS watcher.
Locality contains information of a locality.
Name contains the parsed component of an xDS resource name.
OverloadDropConfig contains the config to drop overloads.
RetryBackoff describes the backoff policy for retries.
RetryConfig contains all retry-related configuration in either a VirtualHost or Route.
Route is both a specification of how to match a request as well as an indication of the action to take upon match.
RouteConfigResourceData wraps the configuration of a RouteConfiguration resource as received from the management server.
RouteConfigUpdate contains information received in an RDS response, which is of interest to the registered RDS watcher.
RouteWithInterceptors captures information in a Route, and contains a usable matcher and also instantiated HTTP Filters.
SecurityConfig contains the security configuration received as part of the Cluster resource on the client-side, and as part of the Listener resource on the server-side.
UpdateErrorMetadata is part of UpdateMetadata.
UpdateMetadata contains the metadata for each update, including timestamp, raw message, and so on.
UpdateWithMD contains the raw message of the update and the metadata, including version, raw message, timestamp.
UsableRouteConfiguration contains a matchable route configuration, with instantiated HTTP Filters per route.
VirtualHost contains the routes for a list of Domains.
VirtualHostWithInterceptors captures information present in a VirtualHost update, and also contains routes with instantiated HTTP Filters.
WeightedCluster contains settings for an xds ActionType.WeightedCluster.
# Interfaces
ClusterWatcher wraps the callbacks to be invoked for different events corresponding to the cluster resource being watched.
EndpointsWatcher wraps the callbacks to be invoked for different events corresponding to the endpoints resource being watched.
ListenerWatcher wraps the callbacks to be invoked for different events corresponding to the listener resource being watched.
Producer contains a single method to discover resource configuration from a remote management server using xDS APIs.
ResourceData contains the configuration data sent by the xDS management server, associated with the resource being watched.
ResourceWatcher wraps the callbacks to be invoked for different events corresponding to the resource being watched.
RouteConfigWatcher wraps the callbacks to be invoked for different events corresponding to the route configuration resource being watched.
Type wraps all resource-type specific functionality.
# Type aliases
ClusterType is the type of cluster from a received CDS response.
EndpointHealthStatus represents the health status of an endpoint.
ErrorType is the type of the error that the watcher will receive from the xds client.
HashPolicyType specifies the type of HashPolicy from a received RDS Response.
OnDoneFunc is a function to be invoked by watcher implementations upon completing the processing of a callback from the xDS client.
RouteActionType is the action of the route from a received RDS response.
ServiceStatus is the status of the update.
SourceType specifies the connection source IP match type.
UpdateValidatorFunc performs validations on update structs using context/logic available at the xdsClient layer.