Documentation ¶
Index ¶
Constants ¶
View Source
const (
// KubeEndPoint is kubelet socket name
KubeEndPoint = "kubelet.sock"
)
View Source
const (
VendorPluginSocketPath string = cnitypes.DaemonBaseDir + "vendor-plugin/vendor-plugin.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 ¶
func NewGrpcPlugin ¶
func NewGrpcPlugin() *nfResources
Types ¶
type DevicePlugin ¶
type DevicePlugin interface {
Start() error
}
type ExcludeConfig ¶
type ExcludeConfig struct {
ExcludeDevices []string `json:"exclude"`
}
ExcludeConfig contains excluded list of devices
type NadUtils ¶
type NadUtils interface { }
NadUtils is an interface for Network-Attachment-Definition utilities
type ResourceFactory ¶
type ResourceFactory interface { GetResourceServer(ResourcePool) (ResourceServer, error) GetResourcePool(rc *ExcludeConfig) (ResourcePool, error) }
ResourceFactory is an interface to get instances of ResourcePool and ResourceServer
type ResourcePool ¶
type ResourcePool interface { // extended API for internal use GetResourceName() string GetResourcePrefix() string GetDevices() map[string]*pluginapi.Device // for ListAndWatch Probe() bool GetDeviceSpecs(deviceIDs []string) []*pluginapi.DeviceSpec GetEnvs(prefix string, deviceIDs []string) (map[string]string, error) GetMounts(deviceIDs []string) []*pluginapi.Mount StoreDeviceInfoFile(resourceNamePrefix string) error CleanDeviceInfoFile(resourceNamePrefix string) error GetCDIName() string }
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 deletion 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.