type Stub …
type stubGetPreferredAllocFunc …
func defaultGetPreferredAllocFunc(r *pluginapi.PreferredAllocationRequest, devs map[string]pluginapi.Device) (*pluginapi.PreferredAllocationResponse, error) { … }
type stubAllocFunc …
func defaultAllocFunc(r *pluginapi.AllocateRequest, devs map[string]pluginapi.Device) (*pluginapi.AllocateResponse, error) { … }
type stubRegisterControlFunc …
func defaultRegisterControlFunc() bool { … }
func NewDevicePluginStub(devs []*pluginapi.Device, socket string, name string, preStartContainerFlag bool, getPreferredAllocationFlag bool) *Stub { … }
func (m *Stub) SetGetPreferredAllocFunc(f stubGetPreferredAllocFunc) { … }
func (m *Stub) SetAllocFunc(f stubAllocFunc) { … }
func (m *Stub) SetRegisterControlFunc(f stubRegisterControlFunc) { … }
func (m *Stub) Start() error { … }
func (m *Stub) Restart() error { … }
func (m *Stub) Stop() error { … }
func (m *Stub) Watch(kubeletEndpoint, resourceName, pluginSockDir string) { … }
func (m *Stub) GetInfo(ctx context.Context, req *watcherapi.InfoRequest) (*watcherapi.PluginInfo, error) { … }
func (m *Stub) NotifyRegistrationStatus(ctx context.Context, status *watcherapi.RegistrationStatus) (*watcherapi.RegistrationStatusResponse, error) { … }
func (m *Stub) Register(kubeletEndpoint, resourceName string, pluginSockDir string) error { … }
func (m *Stub) GetDevicePluginOptions(ctx context.Context, e *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error) { … }
func (m *Stub) PreStartContainer(ctx context.Context, r *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error) { … }
func (m *Stub) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error { … }
func (m *Stub) Update(devs []*pluginapi.Device) { … }
func (m *Stub) GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error) { … }
func (m *Stub) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error) { … }
func (m *Stub) cleanup() error { … }