feat: add ID() method to Schedule interface to get Schedule name

This commit is contained in:
Justin Hammond 2021-04-21 17:48:50 +08:00
parent 60dfaa0397
commit c0a59ede66

View file

@ -240,7 +240,13 @@ func negativeToZero(nextRunDuration time.Duration) time.Duration {
} }
return nextRunDuration return nextRunDuration
} }
// State Returns the current State of the Schedule // State Returns the current State of the Schedule
func (s *Schedule) State() State { func (s *Schedule) State() State {
return s.state return s.state
} }
// ID Returns the Schedule ID
func (s *Schedule) ID() string {
return s.id
}