package internal
Import Path
google.golang.org/grpc/internal (on go.dev)
Dependency Relation
imports 6 packages, and imported by 2 packages
Involved Source Files
Package internal contains gRPC-internal code, to avoid polluting
the godoc of the top-level grpc package. It must not import any grpc
symbols to avoid circular dependencies.
xds_handshake_cluster.go
Package-Level Type Names (total 2, in which 1 are exported)
HealthChecker defines the signature of the client-side LB channel health checking function.
The implementation is expected to create a health checking RPC stream by
calling newStream(), watch for the health status of serviceName, and report
it's health back by calling setConnectivityState().
The health checking protocol is defined at:
https://github.com/grpc/grpc/blob/master/doc/health-checking.md
func google.golang.org/grpc.withHealthCheckFunc(f HealthChecker) grpc.DialOption
var HealthCheckFunc
Package-Level Functions (total 2, both are exported)
GetXDSHandshakeClusterName returns cluster name stored in attr.
SetXDSHandshakeClusterName returns a copy of addr in which the Attributes field
is updated with the cluster name.
Package-Level Variables (total 23, all are exported)
AddGlobalDialOptions adds an array of DialOption that will be effective
globally for newly created client channels. The priority will be: 1.
user-provided; 2. this method; 3. default values.
AddGlobalServerOptions adds an array of ServerOption that will be
effective globally for newly created servers. The priority will be: 1.
user-provided; 2. this method; 3. default values.
BalancerUnregister is exported by package balancer to unregister a balancer.
BinaryLogger returns a ServerOption that can set the binary logger for a
server.
ClearGlobalDialOptions clears the array of extra DialOption. This
method is useful in testing and benchmarking.
ClearGlobalServerOptions clears the array of extra ServerOption. This
method is useful in testing and benchmarking.
DrainServerTransports initiates a graceful close of existing connections
on a gRPC server accepted on the provided listener address. An
xDS-enabled server invokes this method on a grpc.Server when a particular
listener moves to "not-serving" mode.
EqualServiceConfigForTesting is for testing service config generation and
parsing. Both a and b should be returned by ParseServiceConfig.
This function compares the config without rawJSON stripped, in case the
there's difference in white space.
GetCertificateProviderBuilder returns the registered builder for the
given name. This is set by package certprovider for use from xDS
bootstrap code while parsing certificate provider configs in the
bootstrap file.
GetServerCredentials returns the transport credentials configured on a
gRPC server. An xDS-enabled server needs to know what type of credentials
is configured on the underlying gRPC server. This is set by server.go.
GetXDSHandshakeInfoForTesting returns a pointer to the xds.HandshakeInfo
stored in the passed in attributes. This is set by
credentials/xds/xds.go.
HealthCheckFunc is used to provide client-side LB channel health checking
JoinDialOptions combines the dial options passed as arguments into a
single dial option.
JoinServerOptions combines the server options passed as arguments into a
single server option.
KeepaliveMinPingTime is the minimum ping interval. This must be 10s by
default, but tests may wish to set it lower for convenience.
NewXDSResolverWithConfigForTesting creates a new xds resolver builder using
the provided xds bootstrap config instead of the global configuration from
the supported environment variables. The resolver.Builder is meant to be
used in conjunction with the grpc.WithResolvers DialOption.
Testing Only
This function should ONLY be used for testing and may not work with some
other features, including the CSDS service.
ParseServiceConfig parses a JSON representation of the service config.
RegisterRBACHTTPFilterForTesting registers the RBAC HTTP Filter for testing
purposes, regardless of the RBAC environment variable.
TODO: Remove this function once the RBAC env var is removed.
RegisterRLSClusterSpecifierPluginForTesting registers the RLS Cluster
Specifier Plugin for testing purposes, regardless of the XDSRLS environment
variable.
TODO: Remove this function once the RLS env var is removed.
UnregisterRBACHTTPFilterForTesting unregisters the RBAC HTTP Filter for
testing purposes. This is needed because there is no way to unregister the
HTTP Filter after registering it solely for testing purposes using
RegisterRBACHTTPFilterForTesting().
TODO: Remove this function once the RBAC env var is removed.
UnregisterRLSClusterSpecifierPluginForTesting unregisters the RLS Cluster
Specifier Plugin for testing purposes. This is needed because there is no way
to unregister the RLS Cluster Specifier Plugin after registering it solely
for testing purposes using RegisterRLSClusterSpecifierPluginForTesting().
TODO: Remove this function once the RLS env var is removed.
WithBinaryLogger returns a DialOption that specifies the binary logger
for a ClientConn.
WithHealthCheckFunc is set by dialoptions.go
Package-Level Constants (total 4, all are exported)
CredsBundleModeBackendFromBalancer switches GoogleDefaultCreds to mode
that supports backend returned by grpclb balancer.
CredsBundleModeBalancer switches GoogleDefaultCreds to grpclb balancer
mode.
CredsBundleModeFallback switches GoogleDefaultCreds to fallback mode.
RLSLoadBalancingPolicyName is the name of the RLS LB policy.
It currently has an experimental suffix which would be removed once
end-to-end testing of the policy is completed.
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)