Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleControlChannel ¶ added in v0.8.0
func HandleControlChannel(conn protocol.Connection, s ndt.Server)
HandleControlChannel is the "business logic" of an NDT test. It is designed to run every test, and to never need to know whether the underlying connection is just a TCP socket, a WS connection, or a WSS connection. It only needs a connection, and a factory for making single-use servers for connections of that same type.
Types ¶
type NDTResult ¶ added in v0.8.0
type NDTResult struct {
// GitShortCommit is the Git commit (short form) of the running server code.
GitShortCommit string
// These data members should all be self-describing. In the event of confusion,
// rename them to add clarity rather than adding a comment.
ControlChannelUUID string
Protocol ndt.ConnectionType
MessageProtocol string
ServerIP string
ClientIP string
StartTime time.Time
EndTime time.Time
C2S *c2s.ArchivalData `json:",omitempty"`
S2C *s2c.ArchivalData `json:",omitempty"`
Meta meta.ArchivalData `json:",omitempty"`
}
NDTResult is the struct that is serialized as JSON to disk as the archival record of an NDT test.
This struct is dual-purpose. It contains the necessary data to allow joining with tcp-info data and traceroute-caller data as well as any other UUID-based data. It also contains enough data for interested parties to perform lightweight data analysis without needing to join with other tools.