driver

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Name = "dra.memory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Logger      logr.Logger
	DriverName  string
	NodeName    string
	Clientset   kubernetes.Interface
	SysVerifier SysinfoVerifier
	SysRoot     string
	CgroupMount string
}

type KubeletPlugin

type KubeletPlugin interface {
	PublishResources(context.Context, resourceslice.DriverResources) error
	Stop()
}

KubeletPlugin is an interface that describes the methods used from kubeletplugin.Helper.

type MemoryDriver

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

func Start

func Start(ctx context.Context, env Environment) (*MemoryDriver, error)

Start creates and starts a new MemoryDriver.

func (*MemoryDriver) CreateContainer

func (mdrv *MemoryDriver) CreateContainer(ctx context.Context, pod *api.PodSandbox, ctr *api.Container) (*api.ContainerAdjustment, []*api.ContainerUpdate, error)

func (*MemoryDriver) HandleError

func (mdrv *MemoryDriver) HandleError(ctx context.Context, err error, msg string)

func (*MemoryDriver) PrepareResourceClaims

func (mdrv *MemoryDriver) PrepareResourceClaims(ctx context.Context, claims []*resourceapi.ResourceClaim) (map[k8stypes.UID]kubeletplugin.PrepareResult, error)

func (*MemoryDriver) PublishResources

func (mdrv *MemoryDriver) PublishResources(ctx context.Context)

func (*MemoryDriver) RemoveContainer

func (mdrv *MemoryDriver) RemoveContainer(ctx context.Context, pod *api.PodSandbox, ctr *api.Container) error

func (*MemoryDriver) RemovePodSandbox

func (mdrv *MemoryDriver) RemovePodSandbox(ctx context.Context, pod *api.PodSandbox) error

func (*MemoryDriver) RunPodSandbox

func (mdrv *MemoryDriver) RunPodSandbox(ctx context.Context, pod *api.PodSandbox) error

func (*MemoryDriver) Shutdown

func (mdrv *MemoryDriver) Shutdown(ctx context.Context)

Shutdown is called when the runtime is shutting down.

func (*MemoryDriver) Stop

func (mdrv *MemoryDriver) Stop()

func (*MemoryDriver) StopContainer

func (mdrv *MemoryDriver) StopContainer(ctx context.Context, pod *api.PodSandbox, ctr *api.Container) ([]*api.ContainerUpdate, error)

func (*MemoryDriver) StopPodSandbox

func (mdrv *MemoryDriver) StopPodSandbox(ctx context.Context, pod *api.PodSandbox) error

func (*MemoryDriver) Synchronize

func (mdrv *MemoryDriver) Synchronize(ctx context.Context, pods []*api.PodSandbox, containers []*api.Container) ([]*api.ContainerUpdate, error)

func (*MemoryDriver) UnprepareResourceClaims

func (mdrv *MemoryDriver) UnprepareResourceClaims(ctx context.Context, claims []kubeletplugin.NamespacedObject) (map[k8stypes.UID]error, error)

UnprepareResourceClaims is called by the kubelet to unprepare the resources for a claim.

func (*MemoryDriver) UpdateContainer

func (mdrv *MemoryDriver) UpdateContainer(ctx context.Context, pod *api.PodSandbox, ctr *api.Container, res *api.LinuxResources) ([]*api.ContainerUpdate, error)

func (*MemoryDriver) UpdatePodSandbox

func (mdrv *MemoryDriver) UpdatePodSandbox(ctx context.Context, pod *api.PodSandbox, over *api.LinuxResources, res *api.LinuxResources) error

type SysinfoDiscoverer

type SysinfoDiscoverer interface {
	Discover() (sysinfo.MachineData, error)
}

type SysinfoVerifier

type SysinfoVerifier interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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