job

package
v2.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	// Serve starts the job.
	Serve()

	// GetTask retrieves task information from all hosts in the cluster.
	GetTask(context.Context, *internaljob.GetTaskRequest, *logger.SugaredLoggerOnWith) (*internaljob.GetTaskResponse, error)

	// ListTaskEntries lists all task entries.
	ListTaskEntries(context.Context, *internaljob.ListTaskEntriesRequest, *logger.SugaredLoggerOnWith) (*internaljob.ListTaskEntriesResponse, error)

	// PreheatSinglePeer preheats job by single seed peer, scheduler will trigger seed peer to download task.
	PreheatSingleSeedPeer(context.Context, *internaljob.PreheatRequest, *logger.SugaredLoggerOnWith) (*internaljob.PreheatResponse, error)

	// PreheatAllSeedPeers preheats job by all peer seed peers, only suoported by v2 protocol. Scheduler will trigger all seed peers to download task.
	// If all the seed peers download task failed, return error. If some of the seed peers download task failed, return success tasks and failure tasks.
	// Notify the client that the preheat is successful.
	PreheatAllSeedPeers(context.Context, *internaljob.PreheatRequest, *logger.SugaredLoggerOnWith) (*internaljob.PreheatResponse, error)

	// PreheatAllPeers preheats job by all peers, only suoported by v2 protocol. Scheduler will trigger all peers to download task.
	// If all the peers download task failed, return error. If some of the peers download task failed, return success tasks and
	// failure tasks. Notify the client that the preheat is successful.
	PreheatAllPeers(context.Context, *internaljob.PreheatRequest, *logger.SugaredLoggerOnWith) (*internaljob.PreheatResponse, error)
}

Job is an interface for job.

func New

func New(cfg *config.Config, resource resource.Resource, dialOptions ...grpc.DialOption) (Job, error)

New creates a new Job.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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