csot

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTimeoutContext

func IsTimeoutContext(ctx context.Context) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL