CostTrackerFactory configures the factory method to generate a new cost-tracker per-evaluation.
(factory func() (*CostTracker, error))
| 89 | |
| 90 | // CostTrackerFactory configures the factory method to generate a new cost-tracker per-evaluation. |
| 91 | func CostTrackerFactory(factory func() (*CostTracker, error)) CostTrackPlanOption { |
| 92 | return func(fac *costTrackerFactory) *costTrackerFactory { |
| 93 | fac.factory = factory |
| 94 | return fac |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // CostObserver provides an observer that tracks runtime cost. |
| 99 | func CostObserver(opts ...CostTrackPlanOption) PlannerOption { |
no outgoing calls