worker

package
v0.0.0-...-30d97dc Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

This is the core implementation of the worker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker is the implementation of the worker lifecycle.

func NewWorker

func NewWorker(log logr.Logger, config *config.Config, factory cri.SandboxFactory, stopCh <-chan bool, shutdown func() error) (*Worker, error)

NewWorker creates a new worker given the configuration and sandbox factory.

func (*Worker) Run

func (w *Worker) Run(ctx context.Context, gracefulStop <-chan struct{}) error

Run the worker.

func (*Worker) RunTask

func (w *Worker) RunTask(ctx context.Context, claim *tcqueue.TaskClaim)

RunTask runs a single task run to completion.

Jump to

Keyboard shortcuts

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