worker

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatcherClient added in v0.2.3

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

type HandleJobFunc added in v0.2.3

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

type JobUpdaterClient added in v0.2.3

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, allowedGitRemoteExpr []string) (Worker, error)

type WorkerClient added in v0.2.3

type WorkerClient interface {
	DispatcherClient
	JobUpdaterClient
}

Jump to

Keyboard shortcuts

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