client

package
v0.0.0-...-39125e7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultWebSocketHandshakeTimeout is the default timeout used by the client
	// for the WebSocket handshake.
	DefaultWebSocketHandshakeTimeout = 5 * time.Second

	// DefaultStreams is the default number of streams for a new client.
	DefaultStreams = 5
)

Variables

View Source
var (
	// ErrNoTargets is returned if all Locate targets have been tried.
	ErrNoTargets = errors.New("no targets available")
)

Functions

This section is empty.

Types

type Locator

type Locator interface {
	Nearest(ctx context.Context, service string) ([]v2.Target, error)
}

type NDTMClient

type NDTMClient struct {
	ClientName    string
	ClientVersion string

	Dialer *websocket.Dialer

	Server     string
	ServiceURL *url.URL

	Locate Locator

	Scheme string

	NumStreams        int
	Length            time.Duration
	Delay             time.Duration
	CongestionControl string
	MeasurementID     string

	OutputPath    string
	ResultsByUUID map[string]*results.NDTMResult
	// contains filtered or unexported fields
}

func New

func New(clientName, clientVersion string) *NDTMClient

func (*NDTMClient) Download

func (c *NDTMClient) Download(ctx context.Context)

func (*NDTMClient) Upload

func (c *NDTMClient) Upload(ctx context.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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