Documentation ¶
Index ¶
- Constants
- type NodeServer
- func (n *NodeServer) NodeListAndWatchResources(req *kubeletdrav1.NodeListAndWatchResourcesRequest, ...) error
- func (n *NodeServer) NodePrepareResources(ctx context.Context, req *kubeletdrav1.NodePrepareResourcesRequest) (*kubeletdrav1.NodePrepareResourcesResponse, error)
- func (n *NodeServer) NodeUnprepareResources(ctx context.Context, req *kubeletdrav1.NodeUnprepareResourcesRequest) (*kubeletdrav1.NodeUnprepareResourcesResponse, error)
Constants ¶
const AvailableGPUsCount = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeServer ¶
type NodeServer struct {
// contains filtered or unexported fields
}
NodeServer provides the API implementation of the node server. see https://pkg.go.dev/k8s.io/kubelet/pkg/apis/dra/v1alpha3#NodeServer
func NewNodeServer ¶
func NewNodeServer( ctx context.Context, clientSets draclientset.Interface, cdiRoot string, namespace string, nodeName string, log zlog.Logger) (*NodeServer, error)
NewNodeServer returns a new instance of the NodeServer. It also initializes the associated NodeGPUSlices object, which defines the device specs of the corresponding node.
func (*NodeServer) NodeListAndWatchResources ¶
func (n *NodeServer) NodeListAndWatchResources(req *kubeletdrav1.NodeListAndWatchResourcesRequest, s kubeletdrav1.Node_NodeListAndWatchResourcesServer) error
NodeListAndWatchResources returns a stream of NodeResourcesResponse objects. see https://pkg.go.dev/k8s.io/kubelet/pkg/apis/dra/v1alpha3#NodeServer
func (*NodeServer) NodePrepareResources ¶
func (n *NodeServer) NodePrepareResources(ctx context.Context, req *kubeletdrav1.NodePrepareResourcesRequest) (*kubeletdrav1.NodePrepareResourcesResponse, error)
NodePrepareResources prepares several ResourceClaims for use on the node. see https://pkg.go.dev/k8s.io/kubelet/pkg/apis/dra/v1alpha3#NodeServer
func (*NodeServer) NodeUnprepareResources ¶
func (n *NodeServer) NodeUnprepareResources(ctx context.Context, req *kubeletdrav1.NodeUnprepareResourcesRequest) (*kubeletdrav1.NodeUnprepareResourcesResponse, error)
NodeUnprepareResources is the opposite of NodePrepareResources. see https://pkg.go.dev/k8s.io/kubelet/pkg/apis/dra/v1alpha3#NodeServer