Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 938 for rwmutex (0.17 sec)

  1. pilot/cmd/pilot-agent/status/grpcready/probe.go

    	"fmt"
    	"sync"
    
    	"istio.io/istio/pilot/cmd/pilot-agent/status/ready"
    	"istio.io/istio/pkg/file"
    	"istio.io/istio/pkg/istio-agent/grpcxds"
    )
    
    var _ ready.Prober = &probe{}
    
    type probe struct {
    	sync.RWMutex
    	bootstrapPath string
    	bootstrap     *grpcxds.Bootstrap
    }
    
    // NewProbe returns a probe that checks if a valid bootstrap file can be loaded once.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Oct 28 16:58:31 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  2. security/pkg/credentialfetcher/plugin/mock.go

    		return nil, err
    	}
    	return ms, nil
    }
    
    func (ms *MetadataServer) setToken(t string) {
    	ms.mutex.Lock()
    	defer ms.mutex.Unlock()
    	ms.credential = t
    }
    
    // NumGetTokenCall returns the number of token fetching request.
    func (ms *MetadataServer) NumGetTokenCall() int {
    	ms.mutex.RLock()
    	defer ms.mutex.RUnlock()
    
    	return ms.numGetTokenCall
    }
    
    // Reset resets members to default values.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 3K bytes
    - Viewed (0)
  3. pilot/pkg/keycertbundle/watcher.go

    func (w *Watcher) AddWatcher() (int32, chan struct{}) {
    	ch := make(chan struct{}, 1)
    	w.mutex.Lock()
    	defer w.mutex.Unlock()
    	id := w.watcherID
    	w.watchers[id] = ch
    	w.watcherID++
    
    	return id, ch
    }
    
    // RemoveWatcher removes the given watcher.
    func (w *Watcher) RemoveWatcher(id int32) {
    	w.mutex.Lock()
    	defer w.mutex.Unlock()
    	ch := w.watchers[id]
    	if ch != nil {
    		close(ch)
    	}
    	delete(w.watchers, id)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 05 14:00:18 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  4. src/net/mockserver_test.go

    }
    
    func (sl *streamListener) newLocalServer() *localServer {
    	return &localServer{Listener: sl.Listener, done: make(chan bool)}
    }
    
    type dualStackServer struct {
    	lnmu sync.RWMutex
    	lns  []streamListener
    	port string
    
    	cmu sync.RWMutex
    	cs  []Conn // established connections at the passive open side
    }
    
    func (dss *dualStackServer) buildup(handler func(*dualStackServer, Listener)) error {
    	for i := range dss.lns {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. pilot/pkg/networking/core/envoyfilter/monitoring.go

    			return features.EnableEnvoyFilterMetrics
    		}),
    	)
    )
    
    var (
    	envoyFilterStatusMap = map[string]map[string]bool{} // Map of Envoy filter name, patch and status.
    	envoyFilterMutex     sync.RWMutex
    )
    
    // IncrementEnvoyFilterMetric increments filter metric.
    func IncrementEnvoyFilterMetric(name string, pt PatchType, applied bool) {
    	if !features.EnableEnvoyFilterMetrics {
    		return
    	}
    	envoyFilterMutex.Lock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/configuration/configuration_manager_test.go

    	"testing"
    	"time"
    
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/wait"
    )
    
    func TestTolerateBootstrapFailure(t *testing.T) {
    	var fakeGetSucceed bool
    	var fakeGetSucceedLock sync.RWMutex
    	fakeGetFn := func() (runtime.Object, error) {
    		fakeGetSucceedLock.RLock()
    		defer fakeGetSucceedLock.RUnlock()
    		if fakeGetSucceed {
    			return nil, nil
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 06 02:02:38 UTC 2017
    - 2.4K bytes
    - Viewed (0)
  7. cmd/http-stats.go

    	currentS3Requests *HTTPAPIStats
    	totalS3Requests   *HTTPAPIStats
    	totalS34xxErrors  *HTTPAPIStats
    	totalS35xxErrors  *HTTPAPIStats
    	totalS3Canceled   *HTTPAPIStats
    }
    
    type bucketHTTPStats struct {
    	sync.RWMutex
    	httpStats map[string]bucketHTTPAPIStats
    }
    
    func newBucketHTTPStats() *bucketHTTPStats {
    	return &bucketHTTPStats{
    		httpStats: make(map[string]bucketHTTPAPIStats),
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 06:25:13 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  8. pkg/ledger/trie_cache.go

    	"sync"
    	"time"
    
    	"istio.io/istio/pkg/cache"
    )
    
    type cacheDB struct {
    	// updatedNodes that have will be flushed to disk
    	updatedNodes byteCache
    	// updatedMux is a lock for updatedNodes
    	updatedMux sync.RWMutex
    }
    
    // byteCache implements a modified ExpiringCache interface, returning byte arrays
    // for ease of integration with smt calls.
    type byteCache struct {
    	cache cache.ExpiringCache
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. src/syscall/forkpipe2.go

    var (
    	// Guard the forking variable.
    	forkingLock sync.Mutex
    	// Number of goroutines currently forking, and thus the
    	// number of goroutines holding a conceptual write lock
    	// on ForkLock.
    	forking int
    )
    
    // hasWaitingReaders reports whether any goroutine is waiting
    // to acquire a read lock on rw. It is defined in the sync package.
    func hasWaitingReaders(rw *sync.RWMutex) bool
    
    // acquireForkLock acquires a write lock on ForkLock.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 10 19:19:59 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/dropped_requests_tracker.go

    }
    
    // unixStat keeps a statistic how many requests were dropped within
    // a single second.
    type unixStat struct {
    	unixTime int64
    	requests int64
    }
    
    type droppedRequestsStats struct {
    	lock sync.RWMutex
    
    	// history stores the history of dropped requests.
    	history []unixStat
    
    	// To reduce lock-contention, we store the information about
    	// the current second here, which we can then access under
    	// reader lock.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 26 13:50:25 UTC 2023
    - 6.5K bytes
    - Viewed (0)
Back to top