Documentation
¶
Overview ¶
Package rcwebsocket implements WebSocket connectivity to the RC backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunEchoTest ¶
func RunEchoTest(ctx context.Context, client *api.HTTPClient)
RunEchoTest connects to the echo test endpoint ("/api/v0.2/echo-test") in the Remote Config backend, upgrades the HTTP request to a WebSocket connection, and exchanges a series of data frames to measure connectivity, delivery and latency metrics.
The server is expected to "drive" the test by sending frames of varying configurations and waiting for the client to echo them back. The connection is closed by the server upon test completion.
The test continues as long as the connection remains open and the server sends a frame at least once every 5 minutes, otherwise the test times out and the connection is (ungracefully) closed.
Cancel ctx to abort the test - the function will return after the next message arrives (or times out).
Types ¶
This section is empty.