deviceplugin

package
v0.0.0-...-b07c002 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressAndDialer

func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error)

GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer.

func NewRemoteRuntimeService

func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (internalapi.RuntimeService, error)

Types

type Config

type Config struct {
	Annotations map[string]string `json:"annotations"`
}

type ERDMADevicePlugin

type ERDMADevicePlugin struct {
	sync.Locker
	// contains filtered or unexported fields
}

ERDMADevicePlugin implements the Kubernetes device plugin API

func NewERDMADevicePlugin

func NewERDMADevicePlugin(devices []*types.ERdmaDeviceInfo, allocAllDevices bool, devicepluginPreStart bool) (*ERDMADevicePlugin, error)

NewERDMADevicePlugin returns an initialized ERDMADevicePlugin

func (*ERDMADevicePlugin) Allocate

Allocate which return list of devices.

func (*ERDMADevicePlugin) GetDevicePluginOptions

GetDevicePluginOptions return device plugin options

func (*ERDMADevicePlugin) ListAndWatch

ListAndWatch lists devices and update that list according to the health status

func (*ERDMADevicePlugin) PreStartContainer

PreStartContainer return container prestart hook

func (*ERDMADevicePlugin) Register

func (m *ERDMADevicePlugin) Register(request pluginapi.RegisterRequest) error

Register registers the device plugin for the given resourceName with Kubelet.

func (*ERDMADevicePlugin) Serve

func (m *ERDMADevicePlugin) Serve()

Serve starts the gRPC server and register the device plugin to Kubelet

func (*ERDMADevicePlugin) Start

func (m *ERDMADevicePlugin) Start() error

Start starts the gRPC server of the device plugin

func (*ERDMADevicePlugin) Stop

func (m *ERDMADevicePlugin) Stop() error

Stop stops the gRPC server

type Linux

type Linux struct {
	Namespaces []Namespace `json:"namespaces"`
}

type Namespace

type Namespace struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

type RuntimeSpec

type RuntimeSpec struct {
	Linux Linux `json:"linux"`
}

Jump to

Keyboard shortcuts

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