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 ¶
- type Client
- func (c *Client) FetchPsiphonConfig(ctx context.Context) ([]byte, error)
- func (c *Client) FetchTorTargets(ctx context.Context) (map[string]model.TorTarget, error)
- func (c *Client) MaybeLogin(ctx context.Context) error
- func (c *Client) MaybeRegister(ctx context.Context, metadata metadata.Metadata) error
- func (c *Client) Update(ctx context.Context, metadata metadata.Metadata) error
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 model.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 model.Logger, userAgent string, stateFile *statefile.StateFile, ) *Client
NewClient creates a new client.
func (*Client) FetchPsiphonConfig ¶
FetchPsiphonConfig fetches psiphon config from authenticated OONI orchestra.
func (*Client) FetchTorTargets ¶ added in v0.5.0
FetchTorTargets returns the targets for the tor experiment.
func (*Client) MaybeLogin ¶
MaybeLogin performs login if necessary
func (*Client) MaybeRegister ¶
MaybeRegister registers this client if not already registered
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 |
|
tor
Package tor contains code to fetch targets for the tor experiment.
|
Package tor contains code to fetch targets for the tor experiment. |
|
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 |
Click to show internal directories.
Click to hide internal directories.