watcher

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupCDIDeletionWatcher

func SetupCDIDeletionWatcher(ctx context.Context, dir string, cache *CDICache, client versioned.Interface) error

SetupCDIDeletionWatcher watches the given directory for CDI Spec file changes and updates the provided cache accordingly.

func SetupPodDeletionWatcher

func SetupPodDeletionWatcher(ctx context.Context, client kubernetes.Interface, nodeName string, cache *CDICache) error

SetupPodDeletionWatcher registers a pod delete handler that removes any CDI specs associated with the deleted pod via allocation annotations. Spec file deletion will then trigger MIG and AllocationClaim cleanup via the CDI watcher.

Types

type CDICache

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

CDICache stores CDI specs loaded from disk. It is safe for concurrent use.

func NewCDICache

func NewCDICache(cache *cdiapi.Cache) *CDICache

NewCDICache creates a new empty CDICache. If cache is nil the default CDI cache is used.

func (*CDICache) Get

func (c *CDICache) Get(path string) (*cdispec.Spec, bool)

Get returns the spec for the given path if present.

Jump to

Keyboard shortcuts

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