mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
refactor bandwidth throttling for replication target (#17980)
This refactor is to allow using the bandwidth throttling for other purposes.
This commit is contained in:
@@ -1217,8 +1217,10 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj
|
||||
}
|
||||
|
||||
opts := &bandwidth.MonitorReaderOptions{
|
||||
Bucket: objInfo.Bucket,
|
||||
TargetARN: tgt.ARN,
|
||||
BucketOptions: bandwidth.BucketOptions{
|
||||
Name: objInfo.Bucket,
|
||||
ReplicationARN: tgt.ARN,
|
||||
},
|
||||
HeaderSize: headerSize,
|
||||
}
|
||||
newCtx := ctx
|
||||
@@ -1456,8 +1458,10 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object
|
||||
}
|
||||
|
||||
opts := &bandwidth.MonitorReaderOptions{
|
||||
Bucket: objInfo.Bucket,
|
||||
TargetARN: tgt.ARN,
|
||||
BucketOptions: bandwidth.BucketOptions{
|
||||
Name: objInfo.Bucket,
|
||||
ReplicationARN: tgt.ARN,
|
||||
},
|
||||
HeaderSize: headerSize,
|
||||
}
|
||||
newCtx := ctx
|
||||
|
||||
Reference in New Issue
Block a user