mirror of
https://github.com/minio/minio.git
synced 2025-04-29 22:28:00 -04:00
cleanup: use NewWithOptions replace the Deprecated one (#21243)
This commit is contained in:
parent
30a1261c22
commit
9ea14c88d8
@ -2614,12 +2614,11 @@ func getAdminClient(endpoint, accessKey, secretKey string) (*madmin.AdminClient,
|
||||
if globalBucketTargetSys.isOffline(epURL) {
|
||||
return nil, RemoteTargetConnectionErr{Endpoint: epURL.String(), Err: fmt.Errorf("remote target is offline for endpoint %s", epURL.String())}
|
||||
}
|
||||
client, err := madmin.New(epURL.Host, accessKey, secretKey, epURL.Scheme == "https")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client.SetCustomTransport(globalRemoteTargetTransport)
|
||||
return client, nil
|
||||
return madmin.NewWithOptions(epURL.Host, &madmin.Options{
|
||||
Creds: credentials.NewStaticV4(accessKey, secretKey, ""),
|
||||
Secure: epURL.Scheme == "https",
|
||||
Transport: globalRemoteTargetTransport,
|
||||
})
|
||||
}
|
||||
|
||||
func getS3Client(pc madmin.PeerSite) (*minio.Client, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user