Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Everytime ¶
type Everytime struct{}
Everytime always resolves to zero, as a constantly occurring resolver.
type FixedSchedule ¶
FixedSchedule resolves on a specific value, described as At. It also stores Max to delimit the maximum range for this resolver.
func (FixedSchedule) Resolve ¶
func (s FixedSchedule) Resolve(value int) int
Resolve returns the distance to the next occurrence, as unit values.
type RangeSchedule ¶
RangeSchedule resolves on every value between From and To. It also stores Max to delimit the maximum range for this resolver.
func (RangeSchedule) Resolve ¶
func (s RangeSchedule) Resolve(value int) int
Resolve returns the distance to the next occurrence, as unit values.
type StepSchedule ¶
StepSchedule resolves on specific values listed in Steps. It also stores Max to delimit the maximum range for this resolver.
func NewStepSchedule ¶
func NewStepSchedule(from, to, maximum, frequency int) StepSchedule
NewStepSchedule is a constructor to quickly build StepSchedule types, using key values to create the steps -- using from and to delimiters as well as the resolver's maximum value, and a frequency.
func (StepSchedule) Resolve ¶
func (s StepSchedule) Resolve(value int) int
Resolve returns the distance to the next occurrence, as unit values.