mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
Add detailed scanner trace output and notifications (#16668)
This commit is contained in:
@@ -57,6 +57,8 @@ const (
|
||||
ObjectRestoreCompleted
|
||||
ObjectTransitionFailed
|
||||
ObjectTransitionComplete
|
||||
ObjectManyVersions
|
||||
PrefixManyFolders
|
||||
|
||||
objectSingleTypesEnd
|
||||
// Start Compound types that require expansion:
|
||||
@@ -67,6 +69,7 @@ const (
|
||||
ObjectReplicationAll
|
||||
ObjectRestoreAll
|
||||
ObjectTransitionAll
|
||||
ObjectScannerAll
|
||||
Everything
|
||||
)
|
||||
|
||||
@@ -113,6 +116,11 @@ func (name Name) Expand() []Name {
|
||||
ObjectTransitionFailed,
|
||||
ObjectTransitionComplete,
|
||||
}
|
||||
case ObjectScannerAll:
|
||||
return []Name{
|
||||
ObjectManyVersions,
|
||||
PrefixManyFolders,
|
||||
}
|
||||
case Everything:
|
||||
res := make([]Name, objectSingleTypesEnd-1)
|
||||
for i := range res {
|
||||
@@ -202,6 +210,10 @@ func (name Name) String() string {
|
||||
return "s3:ObjectTransition:Failed"
|
||||
case ObjectTransitionComplete:
|
||||
return "s3:ObjectTransition:Complete"
|
||||
case ObjectManyVersions:
|
||||
return "s3:Scanner:ManyVersions"
|
||||
case PrefixManyFolders:
|
||||
return "s3:Scanner:BigPrefix"
|
||||
}
|
||||
|
||||
return ""
|
||||
@@ -314,6 +326,10 @@ func ParseName(s string) (Name, error) {
|
||||
return ObjectTransitionComplete, nil
|
||||
case "s3:ObjectTransition:*":
|
||||
return ObjectTransitionAll, nil
|
||||
case "s3:Scanner:ManyVersions":
|
||||
return ObjectManyVersions, nil
|
||||
case "s3:Scanner:BigPrefix":
|
||||
return PrefixManyFolders, nil
|
||||
default:
|
||||
return 0, &ErrInvalidEventName{s}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user