CostTrackerOptions configures a set of options for cost-tracking. Note, CostTrackerOptions is a no-op unless CostTracking is also enabled.
(costOpts ...cost.TrackerOption)
| 921 | // |
| 922 | // Note, CostTrackerOptions is a no-op unless CostTracking is also enabled. |
| 923 | func CostTrackerOptions(costOpts ...cost.TrackerOption) ProgramOption { |
| 924 | return func(p *prog) (*prog, error) { |
| 925 | p.costOptions = append(p.costOptions, costOpts...) |
| 926 | return p, nil |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | // CostTracking enables cost tracking and registers a ActualCostEstimator that can optionally provide a runtime cost estimate for any function calls. |
| 931 | func CostTracking(costEstimator cost.ActualCostEstimator) ProgramOption { |
no outgoing calls