Documentation ¶
Index ¶
Constants ¶
View Source
const (
// KubeEndPoint is kubelet socket name
KubeEndPoint = "kubelet.sock"
)
Variables ¶
View Source
var ( // SockDir is the default Kubelet device plugin socket directory SockDir = "/var/lib/kubelet/plugins_registry" // DeprecatedSockDir is the deprecated Kubelet device plugin socket directory DeprecatedSockDir = "/var/lib/kubelet/device-plugins" )
Functions ¶
This section is empty.
Types ¶
type DeviceInfoProvider ¶
type DeviceInfoProvider interface { GetDeviceSpecs(pciAddr string) []*pluginapi.DeviceSpec GetEnvVal(pciAddr string) string GetMounts(pciAddr string) []*pluginapi.Mount }
DeviceInfoProvider is an interface to get Device Plugin API specific device information
type DeviceSelector ¶
type DeviceSelector interface {
Filter([]PciNetDevice) []PciNetDevice
}
DeviceSelector provides an interface for filtering a list of devices
type LinkWatcher ¶
type LinkWatcher interface {
Subscribe()
}
LinkWatcher in interface to watch Network link status
type PciNetDevice ¶
type PciNetDevice interface { GetPFName() string GetPfPciAddr() string GetVendor() string GetDriver() string GetDeviceCode() string GetPciAddr() string GetNetName() string IsSriovPF() bool GetLinkSpeed() string GetSubClass() string GetDeviceSpecs() []*pluginapi.DeviceSpec GetEnvVal() string GetMounts() []*pluginapi.Mount GetAPIDevice() *pluginapi.Device GetRdmaSpec() RdmaSpec }
PciNetDevice provides an interface to get device specific information
type RdmaSpec ¶
type RdmaSpec interface { IsRdma() bool GetRdmaDeviceSpec() []*pluginapi.DeviceSpec }
RdmaSpec rdma device data
type ResourceConfList ¶
type ResourceConfList struct {
ResourceList []ResourceConfig `json:"resourceList"` // config file: "resourceList" :[{<ResourceConfig configs>},{},{},...]
}
ResourceConfList is list of ResourceConfig
type ResourceConfig ¶
type ResourceConfig struct { ResourceName string `json:"resourceName"` // the resource name will be added with resource prefix in K8s api IsRdma bool // the resource support rdma Selectors struct { Vendors []string `json:"vendors,omitempty"` Devices []string `json:"devices,omitempty"` Drivers []string `json:"drivers,omitempty"` PfNames []string `json:"pfNames,omitempty"` } `json:"selectors,omitempty"` // Whether devices have SRIOV virtual function capabilities or not }
ResourceConfig contains cofiguration paremeters for a resource pool
type ResourceFactory ¶
type ResourceFactory interface { GetResourceServer(ResourcePool) (ResourceServer, error) GetInfoProvider(string) DeviceInfoProvider GetSelector(string, []string) (DeviceSelector, error) GetResourcePool(rc *ResourceConfig, deviceList []PciNetDevice) (ResourcePool, error) GetRdmaSpec(string) RdmaSpec }
ResourceFactory is an interface to get instances of ResourcePool and ResouceServer
type ResourcePool ¶
type ResourcePool interface { // extended API for internal use GetResourceName() string GetDevices() map[string]*pluginapi.Device // for ListAndWatch Probe() bool GetDeviceSpecs(deviceIDs []string) []*pluginapi.DeviceSpec GetEnvs(deviceIDs []string) []string GetMounts(deviceIDs []string) []*pluginapi.Mount }
ResourcePool represents a generic resource entity
type ResourceServer ¶
type ResourceServer interface { // Device manager API pluginapi.DevicePluginServer // grpc server related Start() error Stop() error // Init initializes resourcePool Init() error // Watch watches for socket file deleteion and restart server if needed Watch() }
ResourceServer is gRPC server implements K8s device plugin api
Click to show internal directories.
Click to hide internal directories.