worker

package
v1.20.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectWorker

func SelectWorker(ctx context.Context, k8sClient client.Client, workloadName string, workerStatuses []tfv1.WorkerStatus) (*tfv1.WorkerStatus, error)

Types

type WorkerGenerator

type WorkerGenerator struct {
	WorkerConfig *tfv1.WorkerConfig
}

func (*WorkerGenerator) AllocPort

func (wg *WorkerGenerator) AllocPort() int

func (*WorkerGenerator) GenerateWorkerPod

func (wg *WorkerGenerator) GenerateWorkerPod(
	gpu *tfv1.GPU,
	generateName string,
	namespace string,
	port int,
	limits tfv1.Resource,
) (*corev1.Pod, error)

func (*WorkerGenerator) WorkerPort

func (wg *WorkerGenerator) WorkerPort(pod *corev1.Pod) (int, error)

Jump to

Keyboard shortcuts

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