workersync

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package workersync reconciles Kubernetes worker pods into the Worker registry behind the ateapi Control API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkerPodInformer

WorkerPodInformer creates a SharedInformerFactory and SharedIndexInformer for worker pods. The resync period re-delivers every cached pod as an update, so a registry record that drifted without a corresponding pod event is repaired on the next sweep.

Types

type WorkerPoolSyncer

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

WorkerPoolSyncer reconciles the state of worker pods from Kubernetes Informer into the Worker registry, over the ateapi Control API.

Informer event handlers only enqueue keys; worker goroutines reconcile each key against the current informer cache state, requeuing with rate-limited backoff on transient failures such as a lost version precondition.

func NewWorkerPoolSyncer

func NewWorkerPoolSyncer(client ateapipb.ControlClient, workerInformer cache.SharedIndexInformer, workerPoolLister listersv1alpha1.WorkerPoolLister) *WorkerPoolSyncer

NewWorkerPoolSyncer creates a new WorkerPoolSyncer.

func (*WorkerPoolSyncer) Start

func (s *WorkerPoolSyncer) Start(ctx context.Context)

Start registers the event handlers and starts the background workers. The informer's initial list synthesizes Add events for every existing pod, so no explicit startup re-list is needed as long as Start is called before the informer factory is started.

Jump to

Keyboard shortcuts

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