Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( WS = ConnectionType("WS") WSS = ConnectionType("WSS") Plain = ConnectionType("PLAIN") )
The types of connections we support.
Functions ¶
This section is empty.
Types ¶
type ConnectionType ¶
type ConnectionType string
ConnectionType records whether this test is performed over plain TCP, websockets, or secure websockets.
func (ConnectionType) Label ¶ added in v0.20.0
func (c ConnectionType) Label() string
Label returns the connection type name used in monitoring metrics.
func (ConnectionType) String ¶ added in v0.11.0
func (c ConnectionType) String() string
String returns the connection type named used in archival data.
type Server ¶
type Server interface { SingleMeasurementServerFactory ConnectionType() ConnectionType DataDir() string Metadata() []metadata.NameValue LoginCeremony(protocol.Connection) (int, error) }
Server describes the methods implemented by every server of every connection type.
type SingleMeasurementServer ¶
type SingleMeasurementServer interface { Port() int ServeOnce(context.Context) (protocol.MeasuredConnection, error) Close() }
SingleMeasurementServer is the interface implemented by every single-serving server. No matter whether they use WSS, WS, TCP with JSON, or TCP without JSON.
type SingleMeasurementServerFactory ¶
type SingleMeasurementServerFactory interface {
SingleServingServer(direction string) (SingleMeasurementServer, error)
}
SingleMeasurementServerFactory is the method by which we abstract away what kind of server is being created at any given time. Using this abstraction allows us to use almost the same code for WS and WSS.