Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CreateFileWatcher (0.23 sec)

  1. cni/pkg/util/pluginutil.go

    		return err
    	case <-ctx.Done():
    		return ctx.Err()
    	}
    }
    
    func (w *Watcher) Close() {
    	_ = w.watcher.Close()
    }
    
    // Creates a file watcher that watches for any changes to the directory
    func CreateFileWatcher(paths ...string) (*Watcher, error) {
    	watcher, err := fsnotify.NewWatcher()
    	if err != nil {
    		return nil, fmt.Errorf("watcher create: %v", err)
    	}
    
    	fileModified, errChan := make(chan struct{}), make(chan error)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. cni/pkg/install/cniconfig.go

    	if !cfg.chainedCNIPlugin {
    		if len(filename) == 0 {
    			filename = "YYY-istio-cni.conf"
    		}
    		return filepath.Join(cfg.mountedCNINetDir, filename), nil
    	}
    
    	watcher, err := util.CreateFileWatcher(cfg.mountedCNINetDir)
    	if err != nil {
    		return "", err
    	}
    	defer watcher.Close()
    
    	for len(filename) == 0 {
    		filename, err = getDefaultCNINetwork(cfg.mountedCNINetDir)
    		if err == nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  3. cni/pkg/install/install.go

    	//
    	// Additionally, fsnotify will lose existing watches on atomic copies (due to overwrite/rename),
    	// so we have to re-watch after re-copy to make sure we always have fresh watches.
    	watcher, err := util.CreateFileWatcher(targets...)
    	if err != nil {
    		return err
    	}
    	defer func() {
    		setNotReady(in.isReady)
    		watcher.Close()
    	}()
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 10.8K bytes
    - Viewed (0)
Back to top