task

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDispatcher added in v0.9.0

func RunDispatcher(persistence Persistence, newDatasource internaldispatcher.NewDatasource,
	getProject handler.Project, bootNodeMultiaddr, operatorPrivateKey, operatorPrivateKeyED25519 string, sequencerPubKey []byte,
	iotexChainID int, projectNotification <-chan *contract.Project, latestProjects LatestProjects, latestProvers handler.LatestProvers) error

func RunLocalDispatcher added in v0.10.1

func RunLocalDispatcher(persistence Persistence, newDatasource internaldispatcher.NewDatasource,
	getProjectIDs ProjectIDs, getProject handler.Project, operatorPrivateKey, operatorPrivateKeyED25519, bootNodeMultiaddr string, sequencerPubKey []byte, iotexChainID int) error

Types

type Datasource added in v0.8.0

type Datasource interface {
	Retrieve(projectID, nextTaskID uint64) (*types.Task, error)
}

type LatestProjects added in v0.10.1

type LatestProjects func() []*contract.Project

type Persistence added in v0.8.0

type Persistence interface {
	Create(tl *types.TaskStateLog, t *types.Task) error
	ProcessedTaskID(projectID uint64) (uint64, error)
	UpsertProcessedTask(projectID, taskID uint64) error
}

type Processor

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

func NewProcessor

func NewProcessor(vmHandler VMHandler, project Project, proverPrivateKey *ecdsa.PrivateKey, seqPubkey []byte, proverID uint64) *Processor

func (*Processor) HandleP2PData added in v0.9.0

func (r *Processor) HandleP2PData(d *p2p.Data, topic *pubsub.Topic)

func (*Processor) HandleProjectProvers added in v0.9.0

func (r *Processor) HandleProjectProvers(projectID uint64, proverIDs []uint64)

type Project added in v0.10.1

type Project func(projectID uint64) (*project.Project, error)

type ProjectIDs added in v0.10.1

type ProjectIDs func() []uint64

type VMHandler added in v0.8.0

type VMHandler interface {
	Handle(task *types.Task, vmtype vm.Type, code string, expParam string) ([]byte, error)
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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