scheduler

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 5 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
}

Scheduler implements the required scheduling logic for submitting Ethereum transactions using a slot-based algorithm

func NewScheduler

func NewScheduler(executionWindow int64) *Scheduler

NewScheduler - Creates new instance of Scheduler

func (*Scheduler) Cancel

func (s *Scheduler) Cancel(id string)

Cancel - Removes and cancels an already scheduled Transaction

func (*Scheduler) Schedule

func (s *Scheduler) Schedule(id string, firstTimestamp, slot int64, task func()) error

Schedule - Schedules new Transaction for execution at the right leader elected slot

type Storage

type Storage struct {
	Executed bool
	Timer    *time.Timer
}

Jump to

Keyboard shortcuts

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