CostTrackerFactory configures the factory method to generate a new cost-tracker per-evaluation.
(factory func() (*CostTracker, error))
| 40 | |
| 41 | // CostTrackerFactory configures the factory method to generate a new cost-tracker per-evaluation. |
| 42 | func CostTrackerFactory(factory func() (*CostTracker, error)) costTrackPlanOption { |
| 43 | return func(fac *costTrackerFactory) *costTrackerFactory { |
| 44 | fac.factory = factory |
| 45 | return fac |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | // CostObserver provides an observer that tracks runtime cost. |
| 50 | func CostObserver(opts ...costTrackPlanOption) PlannerOption { |
no outgoing calls