Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for tryUpdate (0.19 sec)

  1. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go

    		if err != nil {
    			return err
    		}
    		updated, _, err := tryUpdate(current, storage.ResponseMeta{ResourceVersion: rev})
    		if err != nil {
    			return err
    		}
    		return s.copyInto(updated, destination)
    	}
    	return s.Storage.GuaranteedUpdate(ctx, key, destination, ignoreNotFound, preconditions, tryUpdate, cachedExistingObject)
    }
    
    func (s *DryRunnableStorage) Count(key string) (int64, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 20:40:48 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  2. pkg/registry/core/service/allocator/storage/storage.go

    	e.lock.Lock()
    	defer e.lock.Unlock()
    
    	return e.tryUpdate(func() error {
    		return e.alloc.Release(item)
    	})
    
    }
    
    func (e *Etcd) ForEach(fn func(int)) {
    	e.lock.Lock()
    	defer e.lock.Unlock()
    	e.alloc.ForEach(fn)
    }
    
    // tryUpdate performs a read-update to persist the latest snapshot state of allocation.
    func (e *Etcd) tryUpdate(fn func() error) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  3. src/net/nss.go

    func getSystemNSS() *nssConf {
    	nssConfig.tryUpdate()
    	nssConfig.mu.Lock()
    	conf := nssConfig.nssConf
    	nssConfig.mu.Unlock()
    	return conf
    }
    
    // init initializes conf and is only called via conf.initOnce.
    func (conf *nsswitchConfig) init() {
    	conf.nssConf = parseNSSConfFile("/etc/nsswitch.conf")
    	conf.lastChecked = time.Now()
    	conf.ch = make(chan struct{}, 1)
    }
    
    // tryUpdate tries to update conf.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:15:51 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/interfaces.go

    	// GuaranteedUpdate keeps calling 'tryUpdate()' to update key 'key' (of type 'destination')
    	// retrying the update until success if there is index conflict.
    	// Note that object passed to tryUpdate may change across invocations of tryUpdate() if
    	// other writers are simultaneously updating it, so tryUpdate() needs to take into account
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 07:53:48 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  5. src/net/dnsclient_unix.go

    	// Prepare ch so that only one update of resolverConfig may
    	// run at once.
    	conf.ch = make(chan struct{}, 1)
    }
    
    // tryUpdate tries to update conf with the named resolv.conf file.
    // The name variable only exists for testing. It is otherwise always
    // "/etc/resolv.conf".
    func (conf *resolverConfig) tryUpdate(name string) {
    	conf.initOnce.Do(conf.init)
    
    	if conf.dnsConfig.Load().noReload {
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go

    // GuaranteedUpdate implements storage.Interface.GuaranteedUpdate.
    func (s *store) GuaranteedUpdate(
    	ctx context.Context, key string, destination runtime.Object, ignoreNotFound bool,
    	preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, cachedExistingObject runtime.Object) error {
    	preparedKey, err := s.prepareKey(key)
    	if err != nil {
    		return err
    	}
    	ctx, span := tracing.Start(ctx, "GuaranteedUpdate etcd3",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    		return c.storage.GuaranteedUpdate(ctx, key, destination, ignoreNotFound, preconditions, tryUpdate, currObj)
    	}
    	// If we couldn't get the object, fallback to no-suggestion.
    	return c.storage.GuaranteedUpdate(ctx, key, destination, ignoreNotFound, preconditions, tryUpdate, nil)
    }
    
    // Count implements storage.Interface.
    func (c *Cacher) Count(pathPrefix string) (int64, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go

    	ctx context.Context, key string, destination runtime.Object, ignoreNotFound bool,
    	preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, _ runtime.Object) error {
    	return s.Interface.GuaranteedUpdate(ctx, key, destination, ignoreNotFound, preconditions, tryUpdate, s.cachedObj)
    }
    
    func TestDeleteWithCachedObject(t *testing.T) {
    	podName := "foo"
    	podWithFinalizer := &example.Pod{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 101.8K bytes
    - Viewed (0)
Back to top