Documentation ¶
Index ¶
- func AverageCost(plan api.Rates) float64
- func Duration(plan api.Rates) time.Duration
- func End(plan api.Rates) time.Time
- func IsFirst(r api.Rate, plan api.Rates) bool
- func SlotAt(time time.Time, plan api.Rates) api.Rate
- func SlotHasSuccessor(r api.Rate, plan api.Rates) bool
- func Start(plan api.Rates) time.Time
- type Planner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AverageCost ¶
AverageCost returns the time-weighted average cost
func IsFirst ¶
IsFirst returns if the slot is the first slot in the plan. Does not require the plan to be sorted by start time.
func SlotHasSuccessor ¶
SlotHasSuccessor returns if the slot has an immediate successor. Does not require the plan to be sorted by start time.
Types ¶
Click to show internal directories.
Click to hide internal directories.