mlablocatev2

package
v0.0.0-...-bd88772 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package mlablocatev2 use m-lab locate services API v2.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRequestFailed indicates that the response is not "200 Ok"
	ErrRequestFailed = errors.New("mlablocatev2: request failed")

	// ErrEmptyResponse indicates that no hosts were returned
	ErrEmptyResponse = errors.New("mlablocatev2: empty response")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient *http.Client
	Hostname   string
	Logger     model.Logger
	Scheme     string
	UserAgent  string
}

Client is a client for v2 of the locate services.

func NewClient

func NewClient(httpClient *http.Client, logger model.Logger, userAgent string) Client

NewClient creates a client for v2 of the locate services.

func (Client) QueryNDT7

func (c Client) QueryNDT7(ctx context.Context) ([]NDT7Result, error)

QueryNDT7 performs a v2 locate services query for ndt7.

type NDT7Result

type NDT7Result struct {
	Hostname       string
	Site           string
	WSSDownloadURL string
	WSSUploadURL   string
}

NDT7Result is the result of a v2 locate services query for ndt7.

Jump to

Keyboard shortcuts

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