job

package
v0.1.0-2a45951 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJobOptions

func GetJobOptions(request types.JobSpec, withModule bool) (jobcreator.JobCreatorOptions, error)

func GetModule

func GetModule(id string) (types.Module, error)

func GetModules

func GetModules() ([]types.Module, error)

func ProcessJobCreatorOptions

func ProcessJobCreatorOptions(options jobcreator.JobCreatorOptions, request types.JobSpec, withModule bool) (jobcreator.JobCreatorOptions, error)

Types

type JobRunner

type JobRunner struct {
	Ctx        context.Context
	Options    jobcreator.JobCreatorOptions
	Web3SDK    *web3.Web3SDK
	JobCreator *jobcreator.JobCreator
	ErrorChan  chan error
}

func NewJobRunner

func NewJobRunner(ctx context.Context) (*JobRunner, error)

func (*JobRunner) GetJobContainer

func (runner *JobRunner) GetJobContainer(ctx context.Context, request types.JobSpec) (data.JobOfferContainer, error)

func (*JobRunner) GetJobOffer

func (runner *JobRunner) GetJobOffer(ctx context.Context, request types.JobSpec) (data.JobOffer, error)

func (*JobRunner) RunJobAsync

func (runner *JobRunner) RunJobAsync(ctx context.Context, request types.JobSpec) (string, error)

func (*JobRunner) RunJobSync

func (runner *JobRunner) RunJobSync(ctx context.Context, request types.JobSpec, handler func(evOffer data.JobOfferContainer)) (*jobcreator.RunJobResults, error)

func (*JobRunner) Subscribe

func (runner *JobRunner) Subscribe(ctx context.Context, callback jobcreator.JobOfferSubscriber)

Jump to

Keyboard shortcuts

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