Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsConnected (0.19 sec)

  1. internal/event/target/nats.go

    			target.stanConn, connErr = target.args.connectStan()
    		} else if !target.stanConn.NatsConn().IsConnected() {
    			return false, store.ErrNotConnected
    		}
    	} else {
    		if target.natsConn == nil {
    			target.natsConn, connErr = target.args.connectNats()
    		} else if !target.natsConn.IsConnected() {
    			return false, store.ErrNotConnected
    		}
    	}
    
    	if connErr != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 27 18:11:55 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  2. internal/config/identity/plugin/config.go

    func (o *AuthNPlugin) doPeriodicHealthCheck() {
    	ticker := time.NewTicker(healthCheckInterval)
    	defer ticker.Stop()
    
    	for {
    		select {
    		case <-ticker.C:
    			now := time.Now()
    			isConnected := o.checkConnectivity(o.shutdownCtx)
    			if isConnected {
    				o.serviceMetrics.setConnSuccess(now)
    			} else {
    				o.serviceMetrics.setConnFailure(now)
    			}
    		case <-o.shutdownCtx.Done():
    			return
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.3K bytes
    - Viewed (3)
  3. docs/bucket/notifications/README.md

      go func() {
       for {
        // Reconnect if the connection is lost.
        if stanConnection == nil || stanConnection.NatsConn() == nil ||  !stanConnection.NatsConn().IsConnected() {
         stanConnection, _ = stan.Connect("test-cluster", "test-client", stan.NatsURL("nats://yourusername:yoursecret@0.0.0.0:4222"), stan.SetConnectionLostHandler(func(c stan.Conn, _ error) {
          if c.NatsConn() != nil {
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 84K bytes
    - Viewed (2)
Back to top