func IsTimeoutContext(ctx context.Context) bool
func MakeTimeoutContext(ctx context.Context, to time.Duration) (context.Context, context.CancelFunc)
MakeTimeoutContext returns a new context with Client-Side Operation Timeout (CSOT) feature-gated behavior and a Timeout set to the passed in Duration. Setting a Timeout on a single operation is not supported in public API.
TODO(GODRIVER-2348) We may be able to remove this function once CSOT feature-gated behavior becomes the TODO default behavior.
ZeroRTTMonitor implements the RTTMonitor interface and is used internally for testing. It returns 0 for all RTT calculations and an empty string for RTT statistics.
type ZeroRTTMonitor struct{}
func (zrm *ZeroRTTMonitor) EWMA() time.Duration
EWMA implements the RTT monitor interface.
func (zrm *ZeroRTTMonitor) Min() time.Duration
Min implements the RTT monitor interface.
func (zrm *ZeroRTTMonitor) P90() time.Duration
P90 implements the RTT monitor interface.
func (zrm *ZeroRTTMonitor) Stats() string
Stats implements the RTT monitor interface.