k8s

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginManager

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

PluginManager wraps a k8s.Plugin to implement pluginsCore.Plugin. It manages the lifecycle of creating, monitoring, aborting, and finalizing Kubernetes resources for task execution.

func NewPluginManager

func NewPluginManager(id string, plugin k8s.Plugin, kubeClient pluginsCore.KubeClient) *PluginManager

NewPluginManager creates a PluginManager that wraps a k8s.Plugin.

func (*PluginManager) Abort

Abort implements pluginsCore.Plugin. Called when the task should be killed/aborted.

func (*PluginManager) Finalize

Finalize implements pluginsCore.Plugin. Called after Handle or Abort to clean up resources.

func (*PluginManager) GetID

func (pm *PluginManager) GetID() string

func (*PluginManager) GetProperties

func (pm *PluginManager) GetProperties() pluginsCore.PluginProperties

func (*PluginManager) Handle

Handle implements pluginsCore.Plugin. It is invoked for every reconciliation round.

func (*PluginManager) InitializeObjectEventWatcher added in v2.0.10

func (pm *PluginManager) InitializeObjectEventWatcher(ctx context.Context) error

InitializeObjectEventWatcher starts watching Kubernetes object events for this plugin. It is intended to be called during plugin initialization (before task handling starts).

type PluginPhase

type PluginPhase uint8

PluginPhase tracks the high-level phase of the PluginManager's state machine.

const (
	PluginPhaseNotStarted PluginPhase = iota
	PluginPhaseStarted
)

type PluginState

type PluginState struct {
	Phase               PluginPhase
	K8sPluginState      k8s.PluginState
	LastEventUpdate     time.Time
	LastEventRecordedAt time.Time
}

PluginState is the state persisted by the PluginManager between reconciliation rounds.

Jump to

Keyboard shortcuts

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