server

package
v0.0.0-...-58e557b Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// KubeletSocket kubelet 监听 unix 的名称
	KubeletSocket string = "kubelet.sock"
	// DevicePluginPath 默认位置
	DevicePluginPath  string = "/var/lib/kubelet/device-plugins/"
	TotalDevicesCount int    = 40
)

Variables

This section is empty.

Functions

func UnixDial

func UnixDial(addr string, timeout time.Duration) (net.Conn, error)

UnixDial dials to a unix socket using net.DialTimeout

Types

type MultusNicServer

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

MultusNicServer 是一个 device plugin server

func NewMultusNicServer

func NewMultusNicServer() *MultusNicServer

NewMultusNicServer 实例化 MultusNicServer

func (*MultusNicServer) Allocate

Allocate is called during container creation so that the Device Plugin can run device specific operations and instruct Kubelet of the steps to make the Device available in the container

func (*MultusNicServer) GetDevicePluginOptions

func (s *MultusNicServer) GetDevicePluginOptions(ctx context.Context, e *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)

GetDevicePluginOptions returns options to be communicated with Device Manager

func (*MultusNicServer) GetPreferredAllocation

GetPreferredAllocation

func (*MultusNicServer) ListAndWatch

ListAndWatch returns a stream of List of Devices Whenever a Device state change or a Device disappears, ListAndWatch returns the new list

func (*MultusNicServer) PreStartContainer

PreStartContainer is called, if indicated by Device Plugin during registeration phase, before each container start. Device plugin can run device specific operations such as reseting the device before making devices available to the container

func (*MultusNicServer) RegisterToKubelet

func (s *MultusNicServer) RegisterToKubelet() error

RegisterToKubelet 向kubelet注册device plugin

func (*MultusNicServer) Run

func (s *MultusNicServer) Run() error

Run 运行服务

Jump to

Keyboard shortcuts

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