Documentation ¶
Overview ¶
Package mininettest contains the implementation of mininettests. A mininettest is a sub-nettest running embedded as part of another OONI nettest.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCannotParseTLSCert = errors.New("mininettest: cannot parse TLS cert")
ErrCannotParseTLSCert indicates we could not parse a TLS cert.
var ErrNoSuchMiniNettest = errors.New("mininettest: no such mininettest")
ErrNoSuchMiniNettest indicates a given mininettest does not exist.
Functions ¶
func MergeObservations ¶
func MergeObservations(inputs ...*dslx.Observations) *dslx.Observations
MergeObservations merges observations together.
func MergeObservationsLists ¶
func MergeObservationsLists(lists ...[]*dslx.Observations) *dslx.Observations
MergeObservationsLists merges observations lists together.
Types ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment is the environment in which we run mininettest. The zero value of this structure is invalid; use NewEnvironment to instantiate.
func NewEnvironment ¶
func NewEnvironment(logger model.Logger, zeroTime time.Time) *Environment
NewEnvironment creates a new Environment.
func (*Environment) Run ¶
func (env *Environment) Run( ctx context.Context, descr *modelx.MiniNettestDescriptor, ) (*dslx.Observations, error)
Run runs the given mininettest in the current goroutine. This function only returns an error only in case a fundamental error has occurred (e.g., not being able to parse the descriptor With field).