package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
ConnectionClassForKey determines the ConnectionClass which should be used for traffic addressed to the range starting at the given key.
ConnectionClassOrDefault returns the passed-in connection class if it is known/supported by this server.
DefaultContextOptions are mostly used in tests.
GetAddJoinDialOptions returns a standard list of DialOptions for use during Add/Join operations.
IsLocal returns true if the given InternalClient is local.
MakeClientConnConfigFromBaseConfig creates a ClientConnConfig from a base.Config.
NewClientConn creates a new client connection.
NewClientContext creates a new client context.
NewContext creates an rpc.Context with the supplied values.
NewDelayingListener creates a net.Listener that introduces a set delay on its connections.
NewInsecureTestingContext creates an insecure rpc Context suitable for tests.
NewInsecureTestingContextWithClusterID creates an insecure rpc Context suitable for tests.
NewInsecureTestingContextWithKnobs creates an insecure rpc Context suitable for tests configured with the provided knobs.
NewSecurityContext instantiates a SecurityContext.
NewServer sets up an RPC server.
NewServerEx is like NewServer, but also returns the interceptors that have been registered with gRPC for the server.
ServerContextOptionsFromBaseConfig initializes a ContextOptions struct from a base.Config struct.
TestingSetLocalStreamChannelBufferSize overrides channel buffer size used for streaming RPCs.
VerifyDialback verifies connectivity from the recipient of a PingRequest back to the sender.
WithInterceptor adds an additional interceptor.
# Constants
DefaultClass is the default ConnectionClass used for most client traffic.
NumConnectionClasses is the number of valid ConnectionClass values.
RaftClass is the ConnectionClass used for raft traffic.
RangefeedClass is the ConnectionClass used for rangefeeds.
SystemClass is the ConnectionClass used for system traffic.
# Variables
ErrDRPCDisabled is returned from hosts that in principle could but do not have the DRPC server enabled.
ErrNotHeartbeated is returned by ConnHealth or Connection.Health when we have not yet performed the first heartbeat.
ExperimentalDRPCEnabled determines whether a drpc server accepting BatchRequest is enabled.
# Structs
ClientConnConfig contains the configuration for a ClientConn.
ClientInterceptorInfo contains the client-side interceptors that a Context uses for RPC calls.
Connection is a wrapper around grpc.ClientConn.
Context is a pool of *grpc.ClientConn that are periodically health-checked, and for which circuit breaking and metrics are provided.
ContextOptions are passed to NewContext to set up a new *Context.
ContextTestingKnobs provides hooks to aid in testing the system.
A HeartbeatService exposes a method to echo its request params.
Metrics is a metrics struct for Context metrics.
Partitioner is used to create partial partitions between nodes at the GRPC layer.
PeerSnap is the state of a peer.
RemoteClockMetrics is the collection of metrics for the clock monitor.
RemoteClockMonitor keeps track of the most recent measurements of remote offsets and round-trip latency from this node to connected nodes.
SecurityContext is a wrapper providing transport security helpers such as the certificate manager.
SecurityContextOptions contains the subset of base.Config useful to define a SecurityContext.
ServerInterceptorInfo contains the server-side interceptors that a server created with NewServerEx() will run.
# Interfaces
InjectedLatencyOracle is a testing mechanism used to inject artificial latency to an address.
RestrictedInternalClient represents the part of the kvpb.InternalClient interface used by the DistSender.
# Type aliases
ConnectionClass is the identifier of a group of RPC client sessions that are allowed to share an underlying TCP connection; RPC sessions with different connection classes are guaranteed to use separate gRPC client connections.
ServerOption is a configuration option passed to NewServer.