mirror of
https://github.com/minio/minio.git
synced 2025-07-16 12:21:55 -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) {
|
if globalBucketTargetSys.isOffline(epURL) {
|
||||||
return nil, RemoteTargetConnectionErr{Endpoint: epURL.String(), Err: fmt.Errorf("remote target is offline for endpoint %s", epURL.String())}
|
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")
|
return madmin.NewWithOptions(epURL.Host, &madmin.Options{
|
||||||
if err != nil {
|
Creds: credentials.NewStaticV4(accessKey, secretKey, ""),
|
||||||
return nil, err
|
Secure: epURL.Scheme == "https",
|
||||||
}
|
Transport: globalRemoteTargetTransport,
|
||||||
client.SetCustomTransport(globalRemoteTargetTransport)
|
})
|
||||||
return client, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func getS3Client(pc madmin.PeerSite) (*minio.Client, error) {
|
func getS3Client(pc madmin.PeerSite) (*minio.Client, error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user