package
0.23.0
Repository: https://github.com/m-lab/ndt-server.git
Documentation: pkg.go.dev

# Functions

AdaptNetConn turns a non-WS-based TCP connection into a protocol.MeasuredConnection that can have its encoding set on the fly.
AdaptWsConn turns a websocket Connection into a struct which implements both Measurer and Connection.
ReadTLVMessage reads a single NDT message out of the connection.
ReceiveJSONMessage reads a single NDT message in JSON format.
SendJSONMessage writes a single NDT message in JSON format.
SendMetrics sends all the required properties out along the NDT control channel.
UUIDToFile converts a UUID into a newly-created open file with the extension '.json'.
WriteTLVMessage write a single NDT message to the connection.

# Constants

The different message types we support.
MsgError is sent when an error occurs.
MsgExtendedLogin is used to signal advanced capabilities.
MsgLogin is used for signalling capabilities.
MsgLogout is used to logout.
MsgResults sends test results.
MsgUnknown is the zero-value of MessageType and it is the message type to return under error conditions or when the message is malformed.
MsgWaiting is used for queue management.
SrvQueue signals how long a client should wait.
TestFinalize is the last message a test sends.
TestMsg is used for communication during a test.
TestPrepare indicates that the server is getting ready to run a test.
TestStart indicates prepapartion is complete and the test is about to run.
The different message types we support.
Unknown is the zero-value for Encoding.

# Structs

JSONMessage holds the JSON messages we can receive from the server.

# Interfaces

Connection is a general system over which we might be able to read an NDT message.
Measurable things can be measured over a given timeframe.
MeasuredConnection is a connection which can also be measured.
MeasuredFlexibleConnection allows a MeasuredConnection to switch between TLV or JSON encoding.
Messager allows us to send JSON and non-JSON messages using a single unified interface.

# Type aliases

Encoding encodes the communication methods we support.
MessageType is the full set opf NDT protocol messages we understand.