package
1.51.4
Repository: https://github.com/lfch/grpc.git
Documentation: pkg.go.dev

# Packages

Package version defines constants to distinguish between supported xDS API versions.

# 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.
UnmarshalCluster processes resources received in an CDS response, validates them, and transforms them into a native struct which contains only fields we are interested in.
UnmarshalEndpoints processes resources received in an EDS response, validates them, and transforms them into a native struct which contains only fields we are interested in.
UnmarshalListener processes resources received in an LDS response, validates them, and transforms them into a native struct which contains only fields we are interested in.
UnmarshalRouteConfig processes resources received in an RDS response, validates them, and transforms them into a native struct which contains only fields we are interested in.

# Constants

ClusterLRSOff indicates LRS is off (loads are not reported for this cluster).
ClusterLRSServerSelf indicates loads should be reported to the same server (the authority) where the CDS resp is received from.
Version agnostic resource type constants.
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.
Version agnostic resource type constants.
ErrorTypeConnection indicates a connection error from the gRPC client.
ErrorTypeResourceNotFound indicates a resource is not found from the xds response.
ErrorTypeUnknown indicates the error doesn't have a specific type.
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.
Version agnostic resource type constants.
Version agnostic resource type constants.
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.
Version agnostic resource type constants.
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.
Version agnostic resource type constants.

# Variables

RandInt63n overwrites grpcrand for control in tests.

# Structs

ClusterLBPolicyRingHash represents ring_hash lb policy, and also contains its config.
ClusterUpdate contains information from a received CDS response, which is of interest to the registered CDS watcher.
ClusterUpdateErrTuple is a tuple with the update and error.
CompositeMatcher is a matcher that holds onto many matchers and aggregates the matching results.
Endpoint contains information of an endpoint.
EndpointsUpdate contains an EDS update.
EndpointsUpdateErrTuple is a tuple with the update and error.
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.
ListenerUpdate contains information received in an LDS response, which is of interest to the registered LDS watcher.
ListenerUpdateErrTuple is a tuple with the update and error.
Locality contains information of a locality.
Name contains the parsed component of an xDS resource name.
OutlierDetection is the outlier detection configuration for a cluster.
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.
RouteConfigUpdate contains information received in an RDS response, which is of interest to the registered RDS watcher.
RouteConfigUpdateErrTuple is a tuple with the update and error.
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.
UnmarshalOptions wraps the input parameters for `UnmarshalXxx` functions.
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.
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.

# Type aliases

ClusterLRSServerConfigType is the type of LRS server config.
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.
ResourceType identifies resources in a transport protocol agnostic way.
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.