refactor(engine): allow scripts to register experiments (#860)
See https://github.com/ooni/probe/issues/2216
This commit is contained in:
parent
69602abe8a
commit
6a0ae5c70b
53 changed files with 1438 additions and 1200 deletions
12
internal/registry/allexperiments.go
Normal file
12
internal/registry/allexperiments.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package registry
|
||||
|
||||
// Where we register all the available experiments.
|
||||
var allexperiments = map[string]*Factory{}
|
||||
|
||||
// ExperimentNames returns the name of all experiments
|
||||
func ExperimentNames() (names []string) {
|
||||
for key := range allexperiments {
|
||||
names = append(names, key)
|
||||
}
|
||||
return
|
||||
}
|
||||
Loading…
Reference in a new issue