mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Refactor replication target management. (#10154)
Generalize replication target management so that remote targets for a bucket can be managed with ARNs. `mc admin bucket remote` command will be used to manage targets.
This commit is contained in:
@@ -362,11 +362,39 @@ func (e BucketReplicationDestinationNotFound) Error() string {
|
||||
return "Destination bucket does not exist: " + e.Bucket
|
||||
}
|
||||
|
||||
// BucketReplicationTargetNotFound replication target does not exist.
|
||||
type BucketReplicationTargetNotFound GenericError
|
||||
// BucketRemoteTargetNotFound remote target does not exist.
|
||||
type BucketRemoteTargetNotFound GenericError
|
||||
|
||||
func (e BucketReplicationTargetNotFound) Error() string {
|
||||
return "Replication target not found: " + e.Bucket
|
||||
func (e BucketRemoteTargetNotFound) Error() string {
|
||||
return "Remote target not found: " + e.Bucket
|
||||
}
|
||||
|
||||
// BucketRemoteAlreadyExists remote already exists for this target type.
|
||||
type BucketRemoteAlreadyExists GenericError
|
||||
|
||||
func (e BucketRemoteAlreadyExists) Error() string {
|
||||
return "Remote already exists for this bucket: " + e.Bucket
|
||||
}
|
||||
|
||||
// BucketRemoteArnTypeInvalid arn type for remote is not valid.
|
||||
type BucketRemoteArnTypeInvalid GenericError
|
||||
|
||||
func (e BucketRemoteArnTypeInvalid) Error() string {
|
||||
return "Remote ARN type not valid: " + e.Bucket
|
||||
}
|
||||
|
||||
// BucketRemoteArnInvalid arn needs to be specified.
|
||||
type BucketRemoteArnInvalid GenericError
|
||||
|
||||
func (e BucketRemoteArnInvalid) Error() string {
|
||||
return "Remote ARN has invalid format: " + e.Bucket
|
||||
}
|
||||
|
||||
// BucketRemoteRemoveDisallowed when replication configuration exists
|
||||
type BucketRemoteRemoveDisallowed GenericError
|
||||
|
||||
func (e BucketRemoteRemoveDisallowed) Error() string {
|
||||
return "Replication configuration exists with this ARN:" + e.Bucket
|
||||
}
|
||||
|
||||
// BucketReplicationTargetNotVersioned replication target does not have versioning enabled.
|
||||
|
||||
Reference in New Issue
Block a user