Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(name string, config json.RawMessage) (runner.ExperimentRunner, error)
Get a runner that has been registered. Retrieving a runner not yet registered will return an error.
func Register ¶
Register a runner with the provided name and factory function. For registration to be properly recorded, this should be called in the init phase of runtime. The init function is usually defined in the package where the runner is implemented. The name of the runner should be unique across all runner implementations. Registering multiple runners with the same name will return an error.
Types ¶
type Factory ¶
type Factory func(config json.RawMessage) (runner.ExperimentRunner, error)
Factory creates an experiment runner with the provided config. Config is a raw encoded JSON value. The runner implementation should provide a schema and example of the JSON value to explain the usage.