engine

package module
v0.0.0-...-f877a04 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

README

GoDoc Build Status Coverage Status Go Report Card

Measurement Kit engine written in Go

⚠️⚠️⚠️⚠️⚠️⚠️⚠️: This repository is superseded by https://github.com/ooni/probe-engine and will soon be archived and discontinued. Don't depend on it!

This repository contains a Measurement Kit engine written in Go. We currently only implement functionality that it is more practical to directly implement in Go (e.g. the Psiphon nettest). See the design document for a descriptions of the rationale and design of this repository, as well as for a discussion of the relationship between this engine, the main MK engine in C++, and the Measurement Kit Android and iOS APIs.

You can easily integrate this repository into your Go code as usual by adding a

import "github.com/measurement-kit/engine"

statement to your Go code. Note that we require Go >= 1.11 and we use Go modules, so do not checkout this repo in your GOPATH.

You can build an AAR for Android using

./mobile/android/build.bash

which will regenerate the Android specific code and use gomobile to generate bindings and an APK for Android. Make sure you have the Android SDK and NDK installed, that you have run gomobile init, and that you have exported ANDROID_HOME to point to the place in which the Android SDK is installed.

In a similar fashion

./mobile/ios/build.bash

will generate a framework for iOS devices. For this to work, you must be running macOS and have Xcode installed.

Documentation

Overview

Package engine is a Measurement Kit engine written in Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorSubmitResults

type CollectorSubmitResults struct {
	// Good indicates whether we succeeded or not.
	Good bool

	// UpdatedSerializedMeasurement returns the measurement with updated fields.
	UpdatedSerializedMeasurement string

	// UpdatedReportID returns the updated report ID.
	UpdatedReportID string

	// Logs returns logs useful for debugging.
	Logs string
}

CollectorSubmitResults contains the results of submitting or resubmitting a measurement to the OONI collector.

type CollectorSubmitTask

type CollectorSubmitTask struct {
	// SerializedMeasurement is the measurement to submit.
	SerializedMeasurement string

	// SoftwareName is the name of the software submitting the measurement.
	SoftwareName string

	// SoftwareVersion is the name of the software submitting the measurement.
	SoftwareVersion string

	// Timeout is the number of seconds after which we abort submitting.
	Timeout int64
}

CollectorSubmitTask is a synchronous task for submitting or resubmitting a specific OONI measurement to the OONI collector.

func NewCollectorSubmitTask

func NewCollectorSubmitTask(swName, swVersion, measurement string) *CollectorSubmitTask

NewCollectorSubmitTask creates a new CollectorSubmitTask with the specified software name, software version, and serialized measurement fields.

func (*CollectorSubmitTask) Run

Run submits (or resubmits) a measurement and returns the results.

Directories

Path Synopsis
Package internal contains implementation details.
Package internal contains implementation details.
bouncer
Package bouncer contains a OONI bouncer client implementation.
Package bouncer contains a OONI bouncer client implementation.
collector
Package collector contains a OONI collector client implementation.
Package collector contains a OONI collector client implementation.
httpx
Package httpx contains HTTP extensions
Package httpx contains HTTP extensions
nettest
Package nettest contains code for running nettests.
Package nettest contains code for running nettests.
nettest/ndt7
Package ndt7 contains the ndt7 client.
Package ndt7 contains the ndt7 client.
nettest/psiphontunnel
Package psiphontunnel implements the psiphontunnel nettest.
Package psiphontunnel implements the psiphontunnel nettest.
nettest/psiphontunnel/runner
Package runner implements the psiphontunnel runner.
Package runner implements the psiphontunnel runner.
version
Package version contains version information.
Package version contains version information.
Package model defines several structures.
Package model defines several structures.
Package task defines Measurement Kit tasks.
Package task defines Measurement Kit tasks.

Jump to

Keyboard shortcuts

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