| 86 | |
| 87 | |
| 88 | Try<Owned<Checker>> Checker::create( |
| 89 | const CheckInfo& check, |
| 90 | const string& launcherDir, |
| 91 | const lambda::function<void(const CheckStatusInfo&)>& callback, |
| 92 | const TaskID& taskId, |
| 93 | Variant<runtime::Plain, runtime::Docker, runtime::Nested> runtime) |
| 94 | { |
| 95 | // Validate the `CheckInfo` protobuf. |
| 96 | Option<Error> error = common::validation::validateCheckInfo(check); |
| 97 | if (error.isSome()) { |
| 98 | return error.get(); |
| 99 | } |
| 100 | |
| 101 | return Owned<Checker>( |
| 102 | new Checker( |
| 103 | check, |
| 104 | launcherDir, |
| 105 | callback, |
| 106 | taskId, |
| 107 | std::move(runtime))); |
| 108 | } |
| 109 | |
| 110 | |
| 111 | Checker::Checker( |
nothing calls this directly
no test coverage detected