mirror of
https://github.com/pgsty/minio.git
synced 2026-03-15 17:17:01 +01:00
Add madmin package context support (#9172)
This is to improve responsiveness for all admin API operations and allowing callers to cancel any on-going admin operations, if they happen to be waiting too long.
This commit is contained in:
@@ -118,12 +118,12 @@ func (sys *HTTPConsoleLoggerSys) Subscribe(subCh chan interface{}, doneCh chan s
|
||||
// Send log message 'e' to console and publish to console
|
||||
// log pubsub system
|
||||
func (sys *HTTPConsoleLoggerSys) Send(e interface{}, logKind string) error {
|
||||
var lg madmin.LogInfo
|
||||
var lg log.Info
|
||||
switch e := e.(type) {
|
||||
case log.Entry:
|
||||
lg = madmin.LogInfo{Entry: e, NodeName: sys.nodeName}
|
||||
lg = log.Info{Entry: e, NodeName: sys.nodeName}
|
||||
case string:
|
||||
lg = madmin.LogInfo{ConsoleMsg: e, NodeName: sys.nodeName}
|
||||
lg = log.Info{ConsoleMsg: e, NodeName: sys.nodeName}
|
||||
}
|
||||
|
||||
sys.pubsub.Publish(lg)
|
||||
|
||||
Reference in New Issue
Block a user