- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for IsNetworkOrHostDown (0.23 sec)
-
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) -
internal/config/lambda/target/webhook.go
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, http.MethodHead, target.args.Endpoint.String(), nil) if err != nil { if xnet.IsNetworkOrHostDown(err, false) { return false, errNotConnected } return false, err } tokens := strings.Fields(target.args.AuthToken) switch len(tokens) { case 2:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:39:49 UTC 2024 - 6.7K bytes - Viewed (0) -
cmd/admin-server-info.go
if !present { if err := isServerResolvable(endpoint, 5*time.Second); err == nil { network[nodeName] = string(madmin.ItemOnline) } else { if xnet.IsNetworkOrHostDown(err, false) { network[nodeName] = string(madmin.ItemOffline) } else if xnet.IsNetworkOrHostDown(err, true) { network[nodeName] = "connection attempt timedout" } } } } } var memstats runtime.MemStats
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.9K bytes - Viewed (1) -
internal/rest/client.go
return } func (r *respBodyMonitor) Close() (err error) { err = r.ReadCloser.Close() r.errorStatus(err) return } func (r *respBodyMonitor) errorStatus(err error) { if xnet.IsNetworkOrHostDown(err, r.expectTimeouts) { r.errorStatusOnce.Do(func() { atomic.AddUint64(&globalStats.errs, 1) }) } } // dumpHTTP - dump HTTP request and response.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
internal/grid/connection.go
next, remain, err = msgp.ReadBytesZC(remain) if err != nil { if !xnet.IsNetworkOrHostDown(err, true) { gridLogIf(ctx, fmt.Errorf("ws read merged: %w", err)) } return } m.Payload = nil subID, _, err = m.parse(next) if err != nil { if !xnet.IsNetworkOrHostDown(err, true) { gridLogIf(ctx, fmt.Errorf("ws parse merged: %w", err)) } return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 46.7K bytes - Viewed (0) -
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) -
cmd/update.go
} } req.Header.Set("User-Agent", getUserAgent(mode)) client := &http.Client{Transport: getUpdateTransport(timeout)} resp, err := client.Do(req) if err != nil { if xnet.IsNetworkOrHostDown(err, false) { return content, AdminError{ Code: AdminUpdateURLNotReachable, Message: err.Error(), StatusCode: http.StatusServiceUnavailable, } } return content, AdminError{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 18.7K bytes - Viewed (0) -
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) -
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) -
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)