Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 64 for NewMatcher (0.62 sec)

  1. pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go

    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{
    		path:                sockDir,
    		fs:                  &utilfs.DefaultFs{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 01 00:26:37 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  2. pkg/config/mesh/networks_watcher_test.go

    	"istio.io/istio/pkg/config/mesh"
    	"istio.io/istio/pkg/filewatcher"
    )
    
    func TestNewNetworksWatcherWithBadInputShouldFail(t *testing.T) {
    	g := NewWithT(t)
    	_, err := mesh.NewNetworksWatcher(filewatcher.NewWatcher(), "")
    	g.Expect(err).ToNot(BeNil())
    }
    
    func TestNetworksWatcherShouldNotifyHandlers(t *testing.T) {
    	g := NewWithT(t)
    
    	path := newTempFile(t)
    	defer removeSilent(path)
    
    	n := meshconfig.MeshNetworks{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  3. pkg/filewatcher/fakefilewatcher_test.go

    	removedChan := make(chan string, 10)
    
    	changed := func(path string, added bool) {
    		if added {
    			addedChan <- path
    		} else {
    			removedChan <- path
    		}
    	}
    
    	newWatcher, fakeWatcher := NewFakeWatcher(changed)
    	watcher := newWatcher()
    
    	// verify Add()/Remove()
    	for _, file := range []string{"foo", "bar", "baz"} {
    		if err := watcher.Add(file); err != nil {
    			t.Fatalf("Add() returned error: %v", err)
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  4. pkg/kubelet/oom/oom_watcher_linux.go

    type realWatcher struct {
    	recorder    record.EventRecorder
    	oomStreamer streamer
    }
    
    var _ Watcher = &realWatcher{}
    
    // NewWatcher creates and initializes a OOMWatcher backed by Cadvisor as
    // the oom streamer.
    func NewWatcher(recorder record.EventRecorder) (Watcher, error) {
    	// for test purpose
    	_, ok := recorder.(*record.FakeRecorder)
    	if ok {
    		return nil, nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 08 23:17:05 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  5. pilot/pkg/keycertbundle/watcher_test.go

    // limitations under the License.
    
    package keycertbundle
    
    import (
    	"bytes"
    	"os"
    	"path"
    	"testing"
    )
    
    func TestWatcher(t *testing.T) {
    	watcher := NewWatcher()
    
    	// 1. no key cert bundle
    	_, watch1 := watcher.AddWatcher()
    	select {
    	case bundle := <-watch1:
    		t.Errorf("watched unexpected keyCertBundle: %v", bundle)
    		return
    	default:
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 28 17:46:00 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/kube/controller/namespacecontroller_test.go

    	"istio.io/istio/pkg/test"
    	"istio.io/istio/pkg/test/util/retry"
    )
    
    func TestNamespaceController(t *testing.T) {
    	client := kube.NewFakeClient()
    	t.Cleanup(client.Shutdown)
    	watcher := keycertbundle.NewWatcher()
    	caBundle := []byte("caBundle")
    	watcher.SetAndNotify(nil, nil, caBundle)
    	meshWatcher := mesh.NewTestWatcher(&meshconfig.MeshConfig{})
    	stop := test.NewStop(t)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  7. cmd/kubelet/app/server_linux.go

    	"k8s.io/utils/inotify"
    
    	libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups"
    )
    
    func watchForLockfileContention(path string, done chan struct{}) error {
    	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 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 26 09:04:06 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  8. pkg/filewatcher/fakefilewatcher.go

    // FakeWatcher implementation below.
    type NewFileWatcherFunc func() FileWatcher
    
    // FakeWatcher provides a fake file watcher implementation for unit
    // tests. Production code should use the `NewWatcher()`.
    type FakeWatcher struct {
    	sync.Mutex
    
    	events      map[string]chan fsnotify.Event
    	errors      map[string]chan error
    	changedFunc func(path string, added bool)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go

    	watchers := newTimeBucketWatchers(clock, defaultBookmarkFrequency)
    	now := clock.Now()
    	watchers.addWatcherThreadUnsafe(newWatcher(now.Add(10 * time.Second)))
    	watchers.addWatcherThreadUnsafe(newWatcher(now.Add(20 * time.Second)))
    	watchers.addWatcherThreadUnsafe(newWatcher(now.Add(20 * time.Second)))
    
    	if len(watchers.watchersBuckets) != 2 {
    		t.Errorf("unexpected bucket size: %#v", watchers.watchersBuckets)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  10. test-site/activator-launch-1.3.2.jar

    getMatcher(String); public final String getName(); protected abstract Matcher newMatcher(String); public String toString(); } org/apache/ivy/plugins/matcher/ExactPatternMatcher.class package org.apache.ivy.plugins.matcher; public final synchronized class ExactPatternMatcher extends AbstractPatternMatch { public static final ExactPatternMatcher INSTANCE; public void ExactPatternMatcher(); protected final Matcher newMatcher(String); static void <clinit>(); } org/apache/ivy/plugins/matcher/RegexpPatternMatcher.class...
    Registered: Wed Jun 12 15:38:08 UTC 2024
    - Last Modified: Mon Apr 20 08:41:37 UTC 2015
    - 1.2M bytes
    - Viewed (1)
Back to top