Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 483 for rwmutex (0.29 sec)

  1. cmd/kubeadm/app/apis/kubeadm/timeoututils.go

    		UpgradeManifests:                 &metav1.Duration{Duration: constants.UpgradeManifestsTimeout},
    	}
    }
    
    var (
    	activeTimeouts *Timeouts = nil
    	timeoutMutex             = &sync.RWMutex{}
    )
    
    func init() {
    	SetDefaultTimeouts(&activeTimeouts)
    }
    
    // GetActiveTimeouts gets the active timeouts structure.
    func GetActiveTimeouts() *Timeouts {
    	timeoutMutex.RLock()
    	defer timeoutMutex.RUnlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/waitgroup/waitgroup.go

    limitations under the License.
    */
    
    package waitgroup
    
    import (
    	"fmt"
    	"sync"
    )
    
    // SafeWaitGroup must not be copied after first use.
    type SafeWaitGroup struct {
    	wg sync.WaitGroup
    	mu sync.RWMutex
    	// wait indicate whether Wait is called, if true,
    	// then any Add with positive delta will return error.
    	wait bool
    }
    
    // Add adds delta, which may be negative, similar to sync.WaitGroup.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 11 03:04:14 UTC 2018
    - 1.5K bytes
    - Viewed (0)
  3. pilot/pkg/util/informermetric/informerutil.go

    )
    
    var (
    	clusterLabel = monitoring.CreateLabel("cluster")
    
    	errorMetric = monitoring.NewSum(
    		"controller_sync_errors_total",
    		"Total number of errorMetric syncing controllers.",
    	)
    
    	mu       sync.RWMutex
    	handlers = map[cluster.ID]cache.WatchErrorHandler{}
    )
    
    // ErrorHandlerForCluster fetches or creates an ErrorHandler that emits a metric
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. cmd/ilm-config.go

    	"github.com/minio/minio/internal/config/ilm"
    )
    
    var globalILMConfig = ilmConfig{
    	cfg: ilm.Config{
    		ExpirationWorkers: 100,
    		TransitionWorkers: 100,
    	},
    }
    
    type ilmConfig struct {
    	mu  sync.RWMutex
    	cfg ilm.Config
    }
    
    func (c *ilmConfig) getExpirationWorkers() int {
    	c.mu.RLock()
    	defer c.mu.RUnlock()
    
    	return c.cfg.ExpirationWorkers
    }
    
    func (c *ilmConfig) getTransitionWorkers() int {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 05 02:50:24 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  5. cmd/bootstrap-messages.go

    package cmd
    
    import (
    	"context"
    	"sync"
    
    	"github.com/minio/madmin-go/v3"
    	"github.com/minio/minio/internal/pubsub"
    )
    
    const bootstrapTraceLimit = 4 << 10
    
    type bootstrapTracer struct {
    	mu   sync.RWMutex
    	info []madmin.TraceInfo
    }
    
    var globalBootstrapTracer = &bootstrapTracer{}
    
    func (bs *bootstrapTracer) Record(info madmin.TraceInfo) {
    	bs.mu.Lock()
    	defer bs.mu.Unlock()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Aug 23 10:07:06 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/max_seats.go

    	SetMaxSeats(priorityLevelName string, maxSeats uint64)
    
    	// ForgetPriorityLevel removes max seats tracking for a priority level.
    	ForgetPriorityLevel(priorityLevelName string)
    }
    
    type maxSeatsTracker struct {
    	sync.RWMutex
    
    	maxSeats map[string]uint64
    }
    
    func NewMaxSeatsTracker() MaxSeatsTracker {
    	return &maxSeatsTracker{
    		maxSeats: make(map[string]uint64),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 17 19:26:52 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  7. pkg/monitoring/derived_gauge.go

    import (
    	"context"
    	"sync"
    
    	"go.opentelemetry.io/otel/attribute"
    	api "go.opentelemetry.io/otel/metric"
    
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/pkg/slices"
    )
    
    type derivedGauge struct {
    	mu    sync.RWMutex
    	attrs map[attribute.Set]func() float64
    
    	name string
    }
    
    var _ DerivedMetric = &derivedGauge{}
    
    func newDerivedGauge(name, description string) DerivedMetric {
    	dm := &derivedGauge{
    		name:  name,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top