scheduler

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 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, eth2Svc eth2client.Service) (*Scheduler, error)

New returns a new scheduler.

func NewForT

func NewForT(t *testing.T, clock clockwork.Clock, delayFunc delayFunc, pubkeys []core.PubKey, eth2Svc eth2client.Service) *Scheduler

NewForT returns a new scheduler for testing supporting 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 if resolved already, otherwise an 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) Subscribe

func (s *Scheduler) Subscribe(fn func(context.Context, core.Duty, core.DutyDefinitionSet) error)

Subscribe registers a callback for triggering a duty. 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