Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for consumeWatchEvent (0.28 sec)

  1. pkg/kubelet/config/file_unsupported.go

    package config
    
    import (
    	"fmt"
    
    	"k8s.io/klog/v2"
    )
    
    func (s *sourceFile) startWatch() {
    	klog.ErrorS(nil, "Watching source file is unsupported in this build")
    }
    
    func (s *sourceFile) consumeWatchEvent(e *watchEvent) error {
    	return fmt.Errorf("consuming watch event is unsupported in this build")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 908 bytes
    - Viewed (0)
  2. pkg/kubelet/config/file_linux.go

    		eventType = podDelete
    	default:
    		// Ignore rest events
    		return nil
    	}
    
    	s.watchEvents <- &watchEvent{e.Name, eventType}
    	return nil
    }
    
    func (s *sourceFile) consumeWatchEvent(e *watchEvent) error {
    	switch e.eventType {
    	case podAdd, podModify:
    		pod, err := s.extractFromFile(e.fileName)
    		if err != nil {
    			return fmt.Errorf("can't process config file %q: %v", e.fileName, err)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 17:27:26 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  3. pkg/kubelet/config/file.go

    			select {
    			case <-listTicker.C:
    				if err := s.listConfig(); err != nil {
    					klog.ErrorS(err, "Unable to read config path", "path", s.path)
    				}
    			case e := <-s.watchEvents:
    				if err := s.consumeWatchEvent(e); err != nil {
    					klog.ErrorS(err, "Unable to process watch event")
    				}
    			}
    		}
    	}()
    
    	s.startWatch()
    }
    
    func (s *sourceFile) applyDefaults(pod *api.Pod, source string) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 01 07:19:44 UTC 2021
    - 6.2K bytes
    - Viewed (0)
Back to top