Documentation
¶
Overview ¶
Package multiplier applies the node traffic multipliers an administrator sets for times of day.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
Periods []TimePeriod
}
Manager picks the multiplier in effect at a time from its periods.
func NewManager ¶
func NewManager(periods []TimePeriod) *Manager
NewManager returns a manager over periods.
type TimePeriod ¶
type TimePeriod struct {
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Multiplier float32 `json:"multiplier"`
}
TimePeriod is a daily time range, which may cross midnight, and the multiplier that applies within it.
Click to show internal directories.
Click to hide internal directories.