scheduler

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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 New

func New(pubkeys []core.PubKey, eth2Cl eth2wrap.Client, builderAPI bool) (*Scheduler, error)

New returns a new scheduler.

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) Run

func (s *Scheduler) Run() error

Run blocks and runs the scheduler until Stop is called.

func (*Scheduler) Stop

func (s *Scheduler) Stop()

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.

func (*Scheduler) SubscribeSlots added in v0.10.0

func (s *Scheduler) SubscribeSlots(fn func(context.Context, core.Slot) error)

SubscribeSlots subscribes a callback function for triggered slots. Note this should be called *before* Start.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL