Switch notifier to scheduler

This commit is contained in:
Asim Aslam
2020-01-16 13:34:04 +00:00
parent 689ae7cfc7
commit 491a42d352
4 changed files with 20 additions and 20 deletions

View File

@@ -8,16 +8,16 @@ type Option func(o *Options)
// Options configure runtime
type Options struct {
// Notifier for updates
Notifier Notifier
// Scheduler for updates
Scheduler Scheduler
// Service type to manage
Type string
}
// WithNotifier specifies a notifier for updates
func WithNotifier(n Notifier) Option {
// WithScheduler specifies a scheduler for updates
func WithScheduler(n Scheduler) Option {
return func(o *Options) {
o.Notifier = n
o.Scheduler = n
}
}