mirror of
https://github.com/minio/minio.git
synced 2025-12-07 16:22:33 -05: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:
@@ -20,6 +20,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
@@ -40,7 +41,7 @@ func main() {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
creds, err := madmClnt.GetServiceAccount("service-account-access-key")
|
||||
creds, err := madmClnt.GetServiceAccount(context.Background(), "service-account-access-key")
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user