Documentation ¶ Index ¶ type Elector type Periodic func NewScheduler(elector Elector) *Periodic func (s *Periodic) Close() error func (s *Periodic) Open(ctx context.Context) error func (s *Periodic) ScheduleEvery(interval time.Duration, name string, fn func(ctx context.Context) error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Elector ¶ type Elector interface { IsLeader() bool } type Periodic ¶ type Periodic struct { // contains filtered or unexported fields } func NewScheduler ¶ func NewScheduler(elector Elector) *Periodic func (*Periodic) Close ¶ func (s *Periodic) Close() error func (*Periodic) Open ¶ func (s *Periodic) Open(ctx context.Context) error func (*Periodic) ScheduleEvery ¶ func (s *Periodic) ScheduleEvery(interval time.Duration, name string, fn func(ctx context.Context) error) Source Files ¶ View all Source files Periodic.go Click to show internal directories. Click to hide internal directories.