| 79 | } // namespace |
| 80 | |
| 81 | ProgramOptimizerFactory CreateInstrumentationExtension( |
| 82 | InstrumentationFactory factory) { |
| 83 | return [fac = std::move(factory)](PlannerContext&, const cel::Ast& ast) |
| 84 | -> absl::StatusOr<std::unique_ptr<ProgramOptimizer>> { |
| 85 | Instrumentation ins = fac(ast); |
| 86 | if (ins) { |
| 87 | return std::make_unique<InstrumentOptimizer>(std::move(ins)); |
| 88 | } |
| 89 | return nullptr; |
| 90 | }; |
| 91 | } |
| 92 | |
| 93 | } // namespace google::api::expr::runtime |
no outgoing calls