Documentation ¶
Overview ¶
Package mlablocatev2 implements m-lab locate services API v2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyResponse = errors.New("mlablocatev2: empty response")
ErrEmptyResponse indicates that no hosts were returned
View Source
var ErrRequestFailed = errors.New("mlablocatev2: request failed")
ErrRequestFailed indicates that the response is not "200 Ok"
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // HTTPClient is the MANDATORY http client to use HTTPClient model.HTTPClient // Hostname is the MANDATORY hostname of the mlablocate API. Hostname string // Logger is the MANDATORY logger to use. Logger model.Logger // Scheme is the MANDATORY scheme to use (http or https). Scheme string // UserAgent is the MANDATORY user-agent to use. UserAgent string }
Client is a client for v2 of the locate services. Please use the NewClient factory to construct a new instance of client, otherwise you MUST fill all the fields marked as MANDATORY.
type DashResult ¶ added in v3.17.0
type DashResult struct { // Hostname is an informative field containing the hostname // to which you're connected. Because there are access tokens, // you CANNOT use this field directly. Hostname string // Site is an informative field containing the site // to which the server belongs to. Site string // NegotiateURL is the HTTPS URL to be used for // performing the DASH negotiate operation. Note that this // URL typically includes the required access token. NegotiateURL string // BaseURL is the base URL used for the download and the // collect phases of dash. The token is only required during // the negotiate phase and we can otherwise use a base URL. BaseURL string }
DashResult is the result of a v2 locate services query for dash.
type NDT7Result ¶
type NDT7Result struct { // Hostname is an informative field containing the hostname // to which you're connected. Because there are access tokens, // you CANNOT use this field directly. Hostname string // Site is an informative field containing the site // to which the server belongs to. Site string // WSSDownloadURL is the WebSocket URL to be used for // performing a download over HTTPS. Note that the URL // typically includes the required access token. WSSDownloadURL string // WSSUploadURL is like WSSDownloadURL but for the upload. WSSUploadURL string }
NDT7Result is the result of a v2 locate services query for ndt7.
Click to show internal directories.
Click to hide internal directories.