worker

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatcherClient

type DispatcherClient interface {
	DispatchJobs(context.Context, func(*core.JobRecord, uint64) (bool, error)) error
}

type HandleJobFunc

type HandleJobFunc func(*core.JobRecord, uint64) (bool, error)

type JobUpdaterClient

type JobUpdaterClient interface {
	UpdateJob(*core.JobRecord, uint64) (uint64, error)
	UploadLogArtifact(string, string) (string, error)
	UploadResultsArtifact(string, string) (string, error)
	UploadScriptArtifact(string, string) (string, error)
}

type Worker

type Worker interface {
	Run(context.Context) error
}

func NewWorker

func NewWorker(c WorkerClient, jobsDir string) (Worker, error)

type WorkerClient

type WorkerClient interface {
	DispatcherClient
	JobUpdaterClient
}

Jump to

Keyboard shortcuts

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