scheduler

package
v0.13.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(epoch uint64, proverID uint64, pubSubs *p2p.PubSubs, handleProjectProvers HandleProjectProvers, chainHead <-chan uint64, contractProject ContractProject, contractProvers ContractProvers, projectOffsets *ProjectEpochOffsets, projectManager ProjectManager) error

func RunLocal

func RunLocal(pubSubs *p2p.PubSubs, handleProjectProvers HandleProjectProvers, projectManager ProjectManager) error

Types

type ContractProject

type ContractProject func(projectID, blockNumber uint64) *contract.Project

type ContractProvers

type ContractProvers func(blockNumber uint64) []*contract.Prover

type HandleProjectProvers

type HandleProjectProvers func(projectID uint64, proverIDs []uint64)

type LatestProjects

type LatestProjects func() []*contract.Project

type ProjectEpochOffsets

type ProjectEpochOffsets struct {
	// contains filtered or unexported fields
}

func NewProjectEpochOffsets

func NewProjectEpochOffsets(epoch uint64, latestProjects LatestProjects, projectNotification <-chan uint64) *ProjectEpochOffsets

func (*ProjectEpochOffsets) Projects

func (pe *ProjectEpochOffsets) Projects(blockNumber uint64) []*ScheduledProject

type ProjectManager

type ProjectManager interface {
	ProjectIDs() ([]uint64, error)
	Project(projectID uint64) (*project.Project, error)
}

type ScheduledProject

type ScheduledProject struct {
	ID                   uint64
	ScheduledBlockNumber uint64
}

Jump to

Keyboard shortcuts

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