bouncer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package bouncer contains a OONI bouncer client implementation.

Specifically we implement v2.0.0 of the OONI bouncer specification defined in https://github.com/ooni/spec/blob/master/backends/bk-004-bouncer.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// BaseURL is the bouncer base URL.
	BaseURL string

	// HTTPClient is the HTTP client to use.
	HTTPClient *http.Client

	// Logger is the logger to use.
	Logger log.Logger

	// UserAgent is the user agent to use.
	UserAgent string
}

Client is a client for the OONI bouncer API.

func (*Client) GetCollectors

func (c *Client) GetCollectors(
	ctx context.Context,
) (output []model.Service, err error)

GetCollectors queries the bouncer for collectors. Returns a list of entries on success; an error on failure.

func (*Client) GetTestHelpers

func (c *Client) GetTestHelpers(
	ctx context.Context,
) (output map[string][]model.Service, err error)

GetTestHelpers is like GetCollectors but for test helpers.

Jump to

Keyboard shortcuts

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