Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for pluginHandler (0.18 sec)

  1. pkg/kubelet/pluginmanager/reconciler/reconciler.go

    		stopCh)
    }
    
    func (rc *reconciler) AddHandler(pluginType string, pluginHandler cache.PluginHandler) {
    	rc.Lock()
    	defer rc.Unlock()
    
    	rc.handlers[pluginType] = pluginHandler
    }
    
    func (rc *reconciler) getHandlers() map[string]cache.PluginHandler {
    	rc.RLock()
    	defer rc.RUnlock()
    
    	var copyHandlers = make(map[string]cache.PluginHandler)
    	for pluginType, handler := range rc.handlers {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 6.2K bytes
    - Viewed (0)
  2. pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go

    type OperationGenerator interface {
    	// Generates the RegisterPlugin function needed to perform the registration of a plugin
    	GenerateRegisterPluginFunc(
    		socketPath string,
    		timestamp time.Time,
    		pluginHandlers map[string]cache.PluginHandler,
    		actualStateOfWorldUpdater ActualStateOfWorldUpdater) func() error
    
    	// Generates the UnregisterPlugin function needed to perform the unregistration of a plugin
    	GenerateUnregisterPluginFunc(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 14:21:15 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. pkg/kubelet/pluginmanager/cache/types.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package cache
    
    import "time"
    
    // PluginHandler is an interface a client of the pluginwatcher API needs to implement in
    // order to consume plugins
    // The PluginHandler follows the simple following state machine:
    //
    //	                       +--------------------------------------+
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 14:21:15 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. pkg/kubelet/pluginmanager/plugin_manager.go

    	// will be added to the actual state of world cache so that it can be passed to
    	// the desired state of world cache in order to be used during plugin
    	// registration/deregistration
    	AddHandler(pluginType string, pluginHandler cache.PluginHandler)
    }
    
    const (
    	// loopSleepDuration is the amount of time the reconciler loop waits
    	// between successive executions
    	loopSleepDuration = 1 * time.Second
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 01 05:56:33 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  5. pkg/kubelet/pluginmanager/operationexecutor/operation_executor.go

    }
    
    func (oe *operationExecutor) RegisterPlugin(
    	socketPath string,
    	timestamp time.Time,
    	pluginHandlers map[string]cache.PluginHandler,
    	actualStateOfWorld ActualStateOfWorldUpdater) error {
    	generatedOperation :=
    		oe.operationGenerator.GenerateRegisterPluginFunc(socketPath, timestamp, pluginHandlers, actualStateOfWorld)
    
    	return oe.pendingOperations.Run(
    		socketPath, generatedOperation)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 04 06:56:50 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  6. pkg/kubelet/pluginmanager/reconciler/reconciler_test.go

    		fakeRecorder,
    	))
    	reconciler := NewReconciler(
    		oex,
    		reconcilerLoopSleepDuration,
    		dsw,
    		asw,
    	)
    	reconciler.AddHandler(registerapi.DevicePlugin, cache.PluginHandler(di))
    
    	// Start the reconciler to fill ASW.
    	stopChan := make(chan struct{})
    	defer close(stopChan)
    	go reconciler.Run(stopChan)
    	socketPath := filepath.Join(socketDir, "plugin.sock")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 14:21:15 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/devicemanager/plugin/v1beta1/handler.go

    	api "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
    	v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
    	"k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache"
    )
    
    func (s *server) GetPluginHandler() cache.PluginHandler {
    	if f, err := os.Create(s.socketDir + "DEPRECATION"); err != nil {
    		klog.ErrorS(err, "Failed to create deprecation file at socket dir", "path", s.socketDir)
    	} else {
    		f.Close()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 16 14:21:15 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  8. pkg/kubelet/pluginmanager/operationexecutor/operation_executor_test.go

    	return &fakeOperationGenerator{
    		ch:   ch,
    		quit: quit,
    	}
    }
    
    func (fopg *fakeOperationGenerator) GenerateRegisterPluginFunc(
    	socketPath string,
    	timestamp time.Time,
    	pluginHandlers map[string]cache.PluginHandler,
    	actualStateOfWorldUpdater ActualStateOfWorldUpdater) func() error {
    
    	opFunc := func() error {
    		startOperationAndBlock(fopg.ch, fopg.quit)
    		return nil
    	}
    	return opFunc
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 30 03:35:26 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  9. pkg/kubelet/pluginmanager/cache/actual_state_of_world.go

    	sync.RWMutex
    }
    
    var _ ActualStateOfWorld = &actualStateOfWorld{}
    
    // PluginInfo holds information of a plugin
    type PluginInfo struct {
    	SocketPath string
    	Timestamp  time.Time
    	Handler    PluginHandler
    	Name       string
    }
    
    func (asw *actualStateOfWorld) AddPlugin(pluginInfo PluginInfo) error {
    	asw.Lock()
    	defer asw.Unlock()
    
    	if pluginInfo.SocketPath == "" {
    		return fmt.Errorf("socket path is empty")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 24 21:20:24 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/container_manager_stub.go

    	}
    	c := v1.ResourceList{
    		v1.ResourceEphemeralStorage: *resource.NewQuantity(
    			int64(0),
    			resource.BinarySI),
    	}
    	return c
    }
    
    func (cm *containerManagerStub) GetPluginRegistrationHandler() cache.PluginHandler {
    	return nil
    }
    
    func (cm *containerManagerStub) GetDevicePluginResourceCapacity() (v1.ResourceList, v1.ResourceList, []string) {
    	return cm.extendedPluginResources, cm.extendedPluginResources, []string{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 15 02:26:59 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top