|
|
|
@ -986,7 +986,7 @@ func (a adminAPIHandlers) TraceHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
// Use buffered channel to take care of burst sends or slow w.Write()
|
|
|
|
|
traceCh := make(chan interface{}, 4000) |
|
|
|
|
|
|
|
|
|
peers := getRestClients(globalEndpoints) |
|
|
|
|
peers := newPeerRestClients(globalEndpoints) |
|
|
|
|
|
|
|
|
|
globalHTTPTrace.Subscribe(traceCh, ctx.Done(), func(entry interface{}) bool { |
|
|
|
|
return mustTrace(entry, trcAll, trcErr) |
|
|
|
@ -1051,7 +1051,7 @@ func (a adminAPIHandlers) ConsoleLogHandler(w http.ResponseWriter, r *http.Reque |
|
|
|
|
|
|
|
|
|
logCh := make(chan interface{}, 4000) |
|
|
|
|
|
|
|
|
|
peers := getRestClients(globalEndpoints) |
|
|
|
|
peers := newPeerRestClients(globalEndpoints) |
|
|
|
|
|
|
|
|
|
globalConsoleSys.Subscribe(logCh, ctx.Done(), node, limitLines, logKind, nil) |
|
|
|
|
|
|
|
|
@ -1482,7 +1482,9 @@ func (a adminAPIHandlers) ServerInfoHandler(w http.ResponseWriter, r *http.Reque |
|
|
|
|
func fetchLambdaInfo(cfg config.Config) []map[string][]madmin.TargetIDStatus { |
|
|
|
|
|
|
|
|
|
// Fetch the configured targets
|
|
|
|
|
targetList, err := notify.FetchRegisteredTargets(cfg, GlobalContext.Done(), NewGatewayHTTPTransport(), true, false) |
|
|
|
|
tr := NewGatewayHTTPTransport() |
|
|
|
|
defer tr.CloseIdleConnections() |
|
|
|
|
targetList, err := notify.FetchRegisteredTargets(cfg, GlobalContext.Done(), tr, true, false) |
|
|
|
|
if err != nil && err != notify.ErrTargetsOffline { |
|
|
|
|
logger.LogIf(GlobalContext, err) |
|
|
|
|
return nil |
|
|
|
@ -1605,12 +1607,8 @@ func checkConnection(endpointStr string, timeout time.Duration) error { |
|
|
|
|
return pErr |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tr := newCustomHTTPTransport( |
|
|
|
|
&tls.Config{RootCAs: globalRootCAs}, |
|
|
|
|
timeout, |
|
|
|
|
0, /* Default value */ |
|
|
|
|
)() |
|
|
|
|
|
|
|
|
|
tr := newCustomHTTPTransport(&tls.Config{RootCAs: globalRootCAs}, timeout)() |
|
|
|
|
defer tr.CloseIdleConnections() |
|
|
|
|
if dErr := u.DialHTTP(tr); dErr != nil { |
|
|
|
|
if urlErr, ok := dErr.(*url.Error); ok { |
|
|
|
|
// To treat "connection refused" errors as un reachable endpoint.
|
|
|
|
|