Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for IsNetworkOrHostDown (0.15 sec)

  1. internal/event/target/webhook.go

    	return target.store
    }
    
    func (target *WebhookTarget) isActive() (bool, error) {
    	conn, err := net.DialTimeout("tcp", target.addr, 5*time.Second)
    	if err != nil {
    		if xnet.IsNetworkOrHostDown(err, false) {
    			return false, store.ErrNotConnected
    		}
    		return false, err
    	}
    	defer conn.Close()
    	return true, nil
    }
    
    // Save - saves the events to the store if queuestore is configured,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  2. internal/event/target/elasticsearch.go

    	defer cancel()
    
    	err := target.checkAndInitClient(ctx)
    	if err != nil {
    		return err
    	}
    
    	err = target.send(eventData)
    	if xnet.IsNetworkOrHostDown(err, false) {
    		return store.ErrNotConnected
    	}
    	return err
    }
    
    // send - sends the event to the target.
    func (target *ElasticsearchTarget) send(eventData event.Event) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. cmd/storage-rest-client.go

    	"github.com/tinylib/msgp/msgp"
    )
    
    func isNetworkError(err error) bool {
    	if err == nil {
    		return false
    	}
    
    	if nerr, ok := err.(*rest.NetworkError); ok {
    		if down := xnet.IsNetworkOrHostDown(nerr.Err, false); down {
    			return true
    		}
    		if errors.Is(nerr.Err, rest.ErrClientClosed) {
    			return true
    		}
    	}
    	if errors.Is(err, grid.ErrDisconnected) {
    		return true
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  4. internal/logger/target/http/http.go

    	return nil
    }
    
    func (h *Target) send(ctx context.Context, payload []byte, payloadCount int, payloadType string, timeout time.Duration) (err error) {
    	defer func() {
    		if err != nil {
    			if xnet.IsNetworkOrHostDown(err, false) {
    				h.status.Store(statusOffline)
    			}
    			h.failedMessages.Add(int64(payloadCount))
    		} else {
    			h.status.Store(statusOnline)
    		}
    	}()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 11 22:20:42 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  5. cmd/bucket-replication.go

    			}
    		case isErrReadQuorum(serr), isErrWriteQuorum(serr):
    			// destination has some quorum issues, perform removeObject() anyways
    			// to complete the operation.
    		default:
    			if err != nil && minio.IsNetworkOrHostDown(err, true) && !globalBucketTargetSys.isOffline(tgt.EndpointURL()) {
    				globalBucketTargetSys.markOffline(tgt.EndpointURL())
    			}
    			// mark delete marker replication as failed if target cluster not ready to receive
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 06:49:55 UTC 2024
    - 116.1K bytes
    - Viewed (0)
  6. cmd/peer-rest-client.go

    	}
    
    	if values == nil {
    		values = make(url.Values)
    	}
    
    	respBody, err = client.restClient.Call(ctx, method, values, body, length)
    	if err == nil {
    		return respBody, nil
    	}
    
    	if xnet.IsNetworkOrHostDown(err, true) {
    		return nil, errPeerNotReachable
    	}
    
    	return nil, err
    }
    
    // Stringer provides a canonicalized representation of node.
    func (client *peerRESTClient) String() string {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  7. cmd/bucket-lifecycle.go

    			}
    			t.activeTasks.Add(1)
    			if err := transitionObject(t.ctx, objectAPI, task.objInfo, newLifecycleAuditEvent(task.src, task.event)); err != nil {
    				if !isErrVersionNotFound(err) && !isErrObjectNotFound(err) && !xnet.IsNetworkOrHostDown(err, false) {
    					if !strings.Contains(err.Error(), "use of closed network connection") {
    						transitionLogIf(t.ctx, fmt.Errorf("Transition to %s failed for %s/%s version:%s with %w",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 23 15:35:37 UTC 2024
    - 33.7K bytes
    - Viewed (0)
Back to top