legacy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

README

legacy ndt-server code

All code in this directory tree is related to the support of the legacy NDT protocol. We have many extant clients that use this protocol, and we don't want to leave them high and dry, but new clients are encouraged to use the services provided by ndt7. The test is streamlined, the client is easier to write, and basically everything about it is better.

In this subtree, we support existing clients, but we will be adding no new functionality. If you are reading this and trying to decide how to implement a speed test, use ndt7 and not the legacy protocol. The legacy protocol is deprecated. It will be supported until usage drops to very low levels, but it is also not recommended for new integrations or code.

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.

func SaveData added in v0.8.0

func SaveData(record *NDTResult, datadir string)

SaveData archives the data to disk.

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.

Directories

Path Synopsis
Package web100 provides web100 variables (or a simulation thereof) to interested systems.
Package web100 provides web100 variables (or a simulation thereof) to interested systems.

Jump to

Keyboard shortcuts

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