worker

package
v2.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker struct {
	APIServer *server.APIServer // Provides rpcs for other nodes in the cluster
	// contains filtered or unexported fields
}

The Worker object represents

func NewWorker

func NewWorker(
	ctx context.Context,
	env serviceenv.ServiceEnv,
	pachClient *client.APIClient,
	pipelineInfo *pps.PipelineInfo,
	rootPath string,
) (*Worker, error)

NewWorker constructs a Worker object that provides all worker functionality:

  1. a master goroutine that attempts to obtain the master lock for the pipeline workers and direct jobs
  2. a worker goroutine that gets tasks from the master and processes them
  3. an api server that serves requests for status or cross-worker communication
  4. a driver that provides common functionality between the above components

The caller should ensure that the workerId field is being logged by the logger in the provided context.

Directories

Path Synopsis
pipeline

Jump to

Keyboard shortcuts

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