runner

package
v0.0.0-...-1c6d3df Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

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

func Register(name string, factory Factory) error

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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