Documentation
¶
Index ¶
- Constants
- type EdgeDevicePlugin
- func (d *EdgeDevicePlugin) Allocate(_ context.Context, req *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (d *EdgeDevicePlugin) GetDevicePluginOptions(_ context.Context, _ *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (d *EdgeDevicePlugin) GetPreferredAllocation(_ context.Context, prefs *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
- func (d *EdgeDevicePlugin) ListAndWatch(_ *pluginapi.Empty, srv pluginapi.DevicePlugin_ListAndWatchServer) error
- func (d *EdgeDevicePlugin) PreStartContainer(_ context.Context, prereq *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (d *EdgeDevicePlugin) RegisterWithKubelet(ctx context.Context, timeout time.Duration) error
- func (d *EdgeDevicePlugin) Run(ctx context.Context) error
- func (d *EdgeDevicePlugin) Serve(ctx context.Context) error
- func (d *EdgeDevicePlugin) Start(ctx context.Context) error
- func (d *EdgeDevicePlugin) Stop()
Constants ¶
const (
GenericSocketName = "generic.sock"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeDevicePlugin ¶
type EdgeDevicePlugin struct {
// contains filtered or unexported fields
}
func NewEdgeDevicePlugin ¶
func NewEdgeDevicePlugin() *EdgeDevicePlugin
func (*EdgeDevicePlugin) Allocate ¶
func (d *EdgeDevicePlugin) Allocate(_ context.Context, req *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
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 (*EdgeDevicePlugin) GetDevicePluginOptions ¶
func (d *EdgeDevicePlugin) GetDevicePluginOptions(_ context.Context, _ *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
GetDevicePluginOptions returns options to be communicated with Device Manager
func (*EdgeDevicePlugin) GetPreferredAllocation ¶
func (d *EdgeDevicePlugin) GetPreferredAllocation(_ context.Context, prefs *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error)
GetPreferredAllocation returns a preferred set of devices to allocate from a list of available ones. The resulting preferred allocation is not guaranteed to be the allocation ultimately performed by the devicemanager. It is only designed to help the devicemanager make a more informed allocation decision when possible.
func (*EdgeDevicePlugin) ListAndWatch ¶
func (d *EdgeDevicePlugin) ListAndWatch(_ *pluginapi.Empty, srv pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch returns a stream of List of Devices Whenever a Device state change or a Device disappears, ListAndWatch returns the new list
func (*EdgeDevicePlugin) PreStartContainer ¶
func (d *EdgeDevicePlugin) PreStartContainer(_ context.Context, prereq *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
PreStartContainer is called, if indicated by Device Plugin during registeration phase, before each container start. Device plugin can run device specific operations such as resetting the device before making devices available to the container
func (*EdgeDevicePlugin) RegisterWithKubelet ¶
func (*EdgeDevicePlugin) Stop ¶
func (d *EdgeDevicePlugin) Stop()