Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 988 for watcher (0.14 sec)

  1. platforms/core-execution/file-watching/src/test/groovy/org/gradle/internal/watch/registry/impl/AbstractFileWatcherUpdaterTest.groovy

        def setup() {
            updater = createUpdater(watcher, watchableHierarchies)
        }
    
        /**
         * Returns 1 for non-hierarchical watchers, and 0 for hierarchical watchers.
         *
         * For use in interaction tests, when an interaction only happens for non-hierarchical watchers.
         * E.g.:
         * ifNonHierarchical * watcher.startWatching(_)
         */
        abstract int getIfNonHierarchical()
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 25 15:08:33 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    		// cluster-wide watchers scoped by name
    		for _, watcher := range c.watchers.allWatchers[namespacedName{name: name}] {
    			c.watchersBuffer = append(c.watchersBuffer, watcher)
    		}
    	}
    	// cluster-wide watchers unscoped by name
    	for _, watcher := range c.watchers.allWatchers[namespacedName{}] {
    		c.watchersBuffer = append(c.watchersBuffer, watcher)
    	}
    
    	if supported {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/watch/mux_test.go

    	wg := sync.WaitGroup{}
    	wg.Add(len(watches))
    	for i := range watches {
    		// Verify that each watcher only gets the first event because its watch
    		// queue of length one was full from the first one.
    		go func(watcher int, w Interface) {
    			defer wg.Done()
    			e1, ok := <-w.ResultChan()
    			if !ok {
    				t.Errorf("Watcher %v failed to retrieve first event.", watcher)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 16 15:26:25 UTC 2022
    - 8K bytes
    - Viewed (0)
  4. pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go

    )
    
    // Watcher is the plugin watcher
    type Watcher struct {
    	path                string
    	fs                  utilfs.Filesystem
    	fsWatcher           *fsnotify.Watcher
    	desiredStateOfWorld cache.DesiredStateOfWorld
    }
    
    // NewWatcher provides a new watcher for socket registration
    func NewWatcher(sockDir string, desiredStateOfWorld cache.DesiredStateOfWorld) *Watcher {
    	return &Watcher{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 01 00:26:37 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  5. platforms/core-execution/file-watching/src/test/groovy/org/gradle/internal/watch/registry/impl/HierarchicalFileWatcherUpdaterTest.groovy

        @Override
        FileWatcherUpdater createUpdater(FileWatcher watcher, WatchableHierarchies watchableHierarchies) {
            new HierarchicalFileWatcherUpdater(watcher, NO_VALIDATION, probeRegistry, watchableHierarchies, movedWatchedDirectoriesSupplier)
        }
    
        @Override
        int getIfNonHierarchical() { 0 }
    
        def "does not watch hierarchy to watch if no snapshot is inside"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jan 23 13:24:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  6. cni/pkg/util/pluginutil.go

    	for _, path := range paths {
    		if !file.Exists(path) {
    			log.Infof("file watcher skipping watch on non-existent path: %v", path)
    			continue
    		}
    		if err := watcher.Add(path); err != nil {
    			if closeErr := watcher.Close(); closeErr != nil {
    				err = fmt.Errorf("%s: %w", closeErr.Error(), err)
    			}
    			return nil, err
    		}
    	}
    
    	return &Watcher{
    		watcher: watcher,
    		Events:  fileModified,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  7. pkg/filewatcher/filewatcher.go

    		// replaceable functions for tests
    		funcs: &patchTable{
    			newWatcher: fsnotify.NewWatcher,
    			addWatcherPath: func(watcher *fsnotify.Watcher, path string) error {
    				return watcher.Add(path)
    			},
    		},
    	}
    }
    
    // Close releases all resources associated with the watcher
    func (fw *fileWatcher) Close() error {
    	fw.mu.Lock()
    	defer fw.mu.Unlock()
    
    	for _, ws := range fw.workers {
    		ws.worker.terminate()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  8. cmd/kubelet/app/server_linux.go

    	watcher, err := inotify.NewWatcher()
    	if err != nil {
    		klog.ErrorS(err, "Unable to create watcher for lockfile")
    		return err
    	}
    	if err = watcher.AddWatch(path, inotify.InOpen|inotify.InDeleteSelf); err != nil {
    		klog.ErrorS(err, "Unable to watch lockfile")
    		watcher.Close()
    		return err
    	}
    	go func() {
    		select {
    		case ev := <-watcher.Event:
    			klog.InfoS("Inotify event", "event", ev)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 26 09:04:06 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  9. pilot/pkg/leaderelection/leaderelection_test.go

    	watcher := &fakeDefaultWatcher{"foo"}
    	// First pod becomes the leader
    	_, stop := createPerRevisionElection(t, "pod1", "foo", watcher, true, client)
    	// A new pod is not the leader
    	_, stop2 := createPerRevisionElection(t, "pod2", "foo", watcher, false, client)
    	close(stop2)
    	close(stop)
    	t.Log("drop")
    	// After leader is lost, we can take over
    	_, stop3 := createPerRevisionElection(t, "pod2", "foo", watcher, true, client)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  10. pkg/filewatcher/fakefilewatcher_test.go

    		if err := watcher.Add(file); err != nil {
    			t.Fatalf("Add() returned error: %v", err)
    		}
    		if err := watcher.Add(file); err == nil {
    			t.Fatal("Adding a path that already exists should fail")
    		}
    		if err := watcher.Remove(file); err != nil {
    			t.Fatalf("Remove() returned error: %v", err)
    		}
    		if err := watcher.Remove(file); err == nil {
    			t.Fatal("Removing a path that doesn't exist should fail")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 3.8K bytes
    - Viewed (0)
Back to top