validateRunnerConfig validates the runner topology configuration. It returns an error if the topology value is not recognized.
(config *RunnerConfig)
| 38 | // validateRunnerConfig validates the runner topology configuration. |
| 39 | // It returns an error if the topology value is not recognized. |
| 40 | func validateRunnerConfig(config *RunnerConfig) error { |
| 41 | if config == nil { |
| 42 | return nil |
| 43 | } |
| 44 | |
| 45 | switch config.Topology { |
| 46 | case RunnerTopologyArcDind: |
| 47 | return nil |
| 48 | case "": |
| 49 | return nil |
| 50 | default: |
| 51 | return fmt.Errorf("unsupported runner.topology value %q; supported values: %q", config.Topology, RunnerTopologyArcDind) |
| 52 | } |
| 53 | } |