Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 277 for destroyFn (0.28 sec)

  1. staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease.go

    	leaseStorage, destroyFn, err := storagefactory.Create(*config, nil, nil, "")
    	if err != nil {
    		return nil, fmt.Errorf("error creating storage factory: %v", err)
    	}
    	var once sync.Once
    	return &peerEndpointLeaseReconciler{
    		serverLeases: &peerEndpointLeases{
    			storage:   leaseStorage,
    			destroyFn: func() { once.Do(destroyFn) },
    			baseKey:   baseKey,
    			leaseTime: leaseTime,
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  2. pkg/controlplane/reconcilers/lease.go

    }
    
    func (s *storageLeases) Destroy() {
    	s.destroyFn()
    }
    
    // NewLeases creates a new etcd-based Leases implementation.
    func NewLeases(config *storagebackend.ConfigForResource, baseKey string, leaseTime time.Duration) (Leases, error) {
    	// note that newFunc, newListFunc and resourcePrefix
    	// can be left blank unless the storage.Watch method is used
    	leaseStorage, destroyFn, err := storagefactory.Create(*config, nil, nil, "")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  3. pkg/registry/core/service/allocator/storage/storage.go

    }
    
    // Free implements allocator.Interface::Free
    func (e *Etcd) Free() int {
    	e.lock.Lock()
    	defer e.lock.Unlock()
    
    	return e.alloc.Free()
    }
    
    // Destroy implement allocator.Interface::Destroy
    func (e *Etcd) Destroy() {
    	e.destroyFn()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go

    // RegisterDestroyFunc registers a function that will be called during Destroy().
    // The function have to be idempotent and prepared to be called more than once.
    func (s *GenericAPIServer) RegisterDestroyFunc(destroyFn func()) {
    	s.destroyFns = append(s.destroyFns, destroyFn)
    }
    
    // Destroy cleans up all its and its delegation target resources on shutdown.
    // It starts with destroying its own resources and later proceeds with
    // its delegation target.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 42.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease_test.go

    	// prefix so we can reuse the etcd instance for subtests independently.
    	base := "/" + uuid.New().String() + "/peerserverleases/"
    	return peerEndpointLeaseReconciler{serverLeases: &peerEndpointLeases{
    		storage:   s,
    		destroyFn: func() {},
    		baseKey:   base,
    		leaseTime: 1 * time.Minute, // avoid the lease to timeout on tests
    	}}
    }
    
    func (f *peerEndpointLeaseReconciler) SetKeys(servers []serverInfo) error {
    	for _, server := range servers {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. pkg/controlplane/reconcilers/lease_test.go

    	// ref: https://issues.k8s.io/114049
    	base := "/" + uuid.New().String() + "/masterleases/"
    	return &fakeLeases{
    		storageLeases{
    			storage:   s,
    			destroyFn: func() {},
    			baseKey:   base,
    			leaseTime: 1 * time.Minute, // avoid the lease to timeout on tests
    		},
    	}
    }
    
    func (f *fakeLeases) SetKeys(keys []string) error {
    	for _, ip := range keys {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 28.7K bytes
    - Viewed (0)
  7. subprojects/core-api/src/main/java/org/gradle/api/tasks/Destroys.java

     * or output) cannot execute concurrently with a task that destroys this file. This is useful for tasks that
     * clean up after other tasks such as `clean`.</p>
     *
     * @since 4.0
     */
    @Documented
    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.METHOD, ElementType.FIELD})
    public @interface Destroys {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 03:14:53 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  8. subprojects/core/src/integTest/groovy/org/gradle/api/DestroyerTaskCommandLineOrderIntegrationTest.groovy

            }
        }
    
        def "destroyer task with a dependency in another project followed by a producer task followed by a destroyer task are run in the correct order"() {
            def foo = subproject(':foo')
            def bar = subproject(':bar')
    
            def cleanFoo = foo.task('cleanFoo').destroys('build/foo')
            def cleanBar = bar.task('cleanBar').destroys('build/bar').dependsOn(cleanFoo)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Dec 23 14:13:02 UTC 2022
    - 21.1K bytes
    - Viewed (0)
  9. subprojects/core/src/integTest/groovy/org/gradle/api/internal/project/taskfactory/TaskPropertyNamingIntegrationTest.groovy

                class DestroyerBean {
                    @Destroys File destroyedFile
                }
    
                task destroy(type: MyDestroyer) {
                    bean = new DestroyerBean(
                        destroyedFile: file("\$buildDir/destroyed")
                    )
                }
                task printMetadata(type: PrintInputsAndOutputs) {
                    task = destroy
                }
            """
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 21 19:38:50 UTC 2022
    - 16.8K bytes
    - Viewed (0)
  10. subprojects/core/src/integTest/groovy/org/gradle/api/ProducerTaskCommandLineOrderIntegrationTest.groovy

        def "producer task that finalizes a destroyer task will run after the destroyer even when ordered first (type: #type)"() {
            def foo = subproject(':foo')
            def bar = subproject(':bar')
    
            def cleanFoo = foo.task('cleanFoo').destroys('build/foo')
            def cleanBar = bar.task('cleanBar').destroys('build/bar')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 13:27:34 UTC 2024
    - 19.4K bytes
    - Viewed (0)
Back to top