Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTimeoutContext ¶
func MakeTimeoutContext ¶
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.
Types ¶
type ZeroRTTMonitor ¶
type ZeroRTTMonitor struct{}
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.
func (*ZeroRTTMonitor) EWMA ¶
func (zrm *ZeroRTTMonitor) EWMA() time.Duration
EWMA implements the RTT monitor interface.
func (*ZeroRTTMonitor) Min ¶
func (zrm *ZeroRTTMonitor) Min() time.Duration
Min implements the RTT monitor interface.
func (*ZeroRTTMonitor) P90 ¶
func (zrm *ZeroRTTMonitor) P90() time.Duration
P90 implements the RTT monitor interface.
func (*ZeroRTTMonitor) Stats ¶
func (zrm *ZeroRTTMonitor) Stats() string
Stats implements the RTT monitor interface.