orchestra

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package orchestra contains common orchestra code. Orchestra is a set of OONI APIs for probe orchestration. You can find code implementing each specific API into a subpackage of this package. This package contains the toplevel orchestra client that the session should use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient         *http.Client
	Logger             log.Logger
	OrchestrateBaseURL string
	RegistryBaseURL    string
	StateFile          *statefile.StateFile
	UserAgent          string
	// contains filtered or unexported fields
}

Client is a client for OONI orchestra

func NewClient

func NewClient(
	httpClient *http.Client, logger log.Logger,
	userAgent string, stateFile *statefile.StateFile,
) *Client

NewClient creates a new client.

func (*Client) FetchPsiphonConfig

func (c *Client) FetchPsiphonConfig(ctx context.Context) ([]byte, error)

FetchPsiphonConfig fetches psiphon config from authenticated OONI orchestra.

func (*Client) MaybeLogin

func (c *Client) MaybeLogin(ctx context.Context) error

MaybeLogin performs login if necessary

func (*Client) MaybeRegister

func (c *Client) MaybeRegister(
	ctx context.Context, metadata metadata.Metadata,
) error

MaybeRegister registers this client if not already registered

func (*Client) Update

func (c *Client) Update(
	ctx context.Context, metadata metadata.Metadata,
) error

Update updates the state of a probe

Directories

Path Synopsis
Package login contains code to login with OONI orchestra.
Package login contains code to login with OONI orchestra.
Package metadata contains metadata about a probe
Package metadata contains metadata about a probe
Package register contains code to register to the OONI orchestra.
Package register contains code to register to the OONI orchestra.
Package statefile defines the state file
Package statefile defines the state file
testlists
psiphon
Package psiphon implements fetching psiphon config using orchestra
Package psiphon implements fetching psiphon config using orchestra
urls
Package urls queries orchestra test-lists/urls API
Package urls queries orchestra test-lists/urls API
Package testorchestra contains code to simplify testing
Package testorchestra contains code to simplify testing
Package update contains code to update the probe state with orchestra
Package update contains code to update the probe state with orchestra

Jump to

Keyboard shortcuts

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