Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for OnDisconnect (0.13 sec)

  1. platforms/core-runtime/launcher/src/test/groovy/org/gradle/launcher/daemon/server/DefaultDaemonConnectionTest.groovy

            when:
            daemonConnection.onDisconnect(handler)
            daemonConnection.onDisconnect(null)
            connection.disconnect()
            daemonConnection.stop()
    
            then:
            0 * handler._
        }
    
        def "does not notify disconnect handler on stop"() {
            Runnable handler = Mock()
    
            when:
            daemonConnection.onDisconnect(handler)
            daemonConnection.stop()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:51:37 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  2. pilot/pkg/autoregistration/controller_test.go

    		checkEntryOrFail(t, store, wgA, p2, n, c2.instanceID)
    		c2.OnDisconnect(p2conn1) // cleanup for future tests
    	})
    	t.Run("fast reconnect", func(t *testing.T) {
    		t.Run("same instance", func(t *testing.T) {
    			// disconnect, make sure entry is still there with disconnect meta
    			c1.OnDisconnect(p1conn1)
    			checkEntryOrFailAfter(t, store, wgA, p, n, "", features.WorkloadEntryCleanupGracePeriod/2)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 00:00:36 UTC 2024
    - 31.4K bytes
    - Viewed (0)
  3. platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/server/exec/WatchForDisconnection.java

        @Override
        public void execute(final DaemonCommandExecution execution) {
            // Watch for the client disconnecting before we call stop()
            execution.getConnection().onDisconnect(new Runnable() {
                @Override
                public void run() {
                    LOGGER.warn("thread {}: client disconnection detected, canceling the build", Thread.currentThread().getId());
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  4. pilot/pkg/autoregistration/connections.go

    	ID() string
    	Proxy() *model.Proxy
    	ConnectedAt() time.Time
    	Stop()
    }
    
    // a single proxy may have multiple connections, so we track them here
    // when a WorkloadGroup is deleted, we can force disconnects
    // when OnDisconnect occurs, we only trigger cleanup when there are no more connections for that proxy
    type adsConnections struct {
    	sync.Mutex
    
    	// keyed by proxy id, then connection id
    	byProxy map[proxyKey]map[string]connection
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Sep 19 20:41:55 UTC 2023
    - 3K bytes
    - Viewed (0)
  5. tests/fuzz/autoregistration_controller_fuzzer.go

    // in the workloadentry package. It does so by setting
    // up a workloadentry controller with a proxy with
    // pseudo-random values.
    // The fuzzer then uses the controller to test:
    // 1: OnConnect
    // 2: OnDisconnect
    // 3: QueueWorkloadEntryHealth
    func FuzzWE(data []byte) int {
    	f := fuzz.NewConsumer(data)
    	proxy := &model.Proxy{}
    	err := f.GenerateStruct(proxy)
    	if err != nil {
    		return 0
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Sep 19 20:41:55 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/server/api/DaemonConnection.java

         * </ul>
         *
         * Note: the handler may be run from another thread before this method returns.
         *
         * @param handler the handler. Use null to remove the current handler.
         */
        void onDisconnect(@Nullable Runnable handler);
    
        /**
         * Registers a handler for when this connection receives cancel command. The handler is notified at most once.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:51:37 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/server/DefaultDaemonConnection.java

                }
            });
        }
    
        @Override
        public void onStdin(StdinHandler handler) {
            stdinQueue.useHandler(handler);
        }
    
        @Override
        public void onDisconnect(Runnable handler) {
            disconnectQueue.useHandler(handler);
        }
    
        @Override
        public void onCancel(Runnable handler) {
            cancelQueue.useHandler(handler);
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:51:37 UTC 2024
    - 16K bytes
    - Viewed (0)
  8. pilot/pkg/autoregistration/controller.go

    	_, err := c.store.Update(wle)
    	if err != nil {
    		return false, fmt.Errorf("disconnect: failed updating WorkloadEntry %s/%s: %v", proxy.Metadata.Namespace, entryName, err)
    	}
    	return true, nil
    }
    
    // OnDisconnect determines whether a connected proxy represents a non-Kubernetes
    // workload and, if that's the case, terminates special processing required for that type
    // of workloads, such as auto-registration, health status updates, etc.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 00:00:36 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  9. pilot/pkg/xds/ads.go

    	if con.ID() == "" {
    		return
    	}
    	s.removeCon(con.ID())
    	if s.StatusReporter != nil {
    		s.StatusReporter.RegisterDisconnect(con.ID(), AllTrackingEventTypes)
    	}
    	s.WorkloadEntryController.OnDisconnect(con)
    }
    
    func connectionID(node string) string {
    	id := atomic.AddInt64(&connectionNumber, 1)
    	return node + "-" + strconv.FormatInt(id, 10)
    }
    
    // Only used for test
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 03 08:29:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top