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