2022-08-17 10:57:03 +02:00
|
|
|
package registry
|
|
|
|
|
|
|
|
//
|
|
|
|
// Registers the `example' experiment.
|
|
|
|
//
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/ooni/probe-cli/v3/internal/engine/experiment/example"
|
|
|
|
"github.com/ooni/probe-cli/v3/internal/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2022-08-31 12:44:46 +02:00
|
|
|
AllExperiments["example"] = &Factory{
|
2022-08-17 10:57:03 +02:00
|
|
|
build: func(config interface{}) model.ExperimentMeasurer {
|
|
|
|
return example.NewExperimentMeasurer(
|
|
|
|
*config.(*example.Config), "example",
|
|
|
|
)
|
|
|
|
},
|
|
|
|
config: &example.Config{
|
|
|
|
Message: "Good day from the example experiment!",
|
|
|
|
SleepTime: int64(time.Second),
|
|
|
|
},
|
|
|
|
interruptible: true,
|
|
|
|
inputPolicy: model.InputNone,
|
|
|
|
}
|
|
|
|
}
|