Documentation ¶
Index ¶
- type Scheduler
- func (s *Scheduler) GetDutyDefinition(ctx context.Context, duty core.Duty) (core.DutyDefinitionSet, error)
- func (s *Scheduler) Run() error
- func (s *Scheduler) Stop()
- func (s *Scheduler) SubscribeDuties(fn func(context.Context, core.Duty, core.DutyDefinitionSet) error)
- func (s *Scheduler) SubscribeSlots(fn func(context.Context, core.Slot) error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewForT ¶
func NewForT(t *testing.T, clock clockwork.Clock, delayFunc delayFunc, pubkeys []core.PubKey, eth2Cl eth2wrap.Client, builderAPI bool, ) *Scheduler
NewForT returns a new scheduler for testing using a fake clock.
func (*Scheduler) GetDutyDefinition ¶ added in v0.7.0
func (s *Scheduler) GetDutyDefinition(ctx context.Context, duty core.Duty) (core.DutyDefinitionSet, error)
GetDutyDefinition returns the definition for a duty or core.ErrNotFound if no definitions exist for a resolved epoch or another error.
func (*Scheduler) SubscribeDuties ¶ added in v0.10.0
func (s *Scheduler) SubscribeDuties(fn func(context.Context, core.Duty, core.DutyDefinitionSet) error)
SubscribeDuties subscribes a callback function for triggered duties. Note this should be called *before* Start.
Click to show internal directories.
Click to hide internal directories.