mirror of
https://github.com/minio/minio.git
synced 2026-02-05 02:10:14 -05:00
Implement batch-expiration for objects (#17946)
Based on an initial PR from - https://github.com/minio/minio/pull/17792 But fully completes it with newer finalized YAML spec.
This commit is contained in:
committed by
GitHub
parent
69294cf98a
commit
a50f26b7f5
@@ -44,6 +44,17 @@ type EvalRetentionBypassFn func(o ObjectInfo, gerr error) error
|
||||
// GetObjectInfoFn is the signature of GetObjectInfo function.
|
||||
type GetObjectInfoFn func(ctx context.Context, bucket, object string, opts ObjectOptions) (ObjectInfo, error)
|
||||
|
||||
// WalkVersionsSortOrder represents the sort order in which versions of an
|
||||
// object should be returned by ObjectLayer.Walk method
|
||||
type WalkVersionsSortOrder uint8
|
||||
|
||||
const (
|
||||
// WalkVersionsSortAsc - Sort in ascending order of ModTime
|
||||
WalkVersionsSortAsc WalkVersionsSortOrder = iota
|
||||
// WalkVersionsSortDesc - Sort in descending order of ModTime
|
||||
WalkVersionsSortDesc
|
||||
)
|
||||
|
||||
// ObjectOptions represents object options for ObjectLayer object operations
|
||||
type ObjectOptions struct {
|
||||
ServerSideEncryption encrypt.ServerSide
|
||||
@@ -111,10 +122,11 @@ type ObjectOptions struct {
|
||||
|
||||
// WalkOptions provides filtering, marker and other Walk() specific options.
|
||||
type WalkOptions struct {
|
||||
Filter func(info FileInfo) bool // return WalkFilter returns 'true/false'
|
||||
Marker string // set to skip until this object
|
||||
LatestOnly bool // returns only latest versions for all matching objects
|
||||
AskDisks string // dictates how many disks are being listed
|
||||
Filter func(info FileInfo) bool // return WalkFilter returns 'true/false'
|
||||
Marker string // set to skip until this object
|
||||
LatestOnly bool // returns only latest versions for all matching objects
|
||||
AskDisks string // dictates how many disks are being listed
|
||||
VersionsSort WalkVersionsSortOrder // sort order for versions of the same object; default: Ascending order in ModTime
|
||||
}
|
||||
|
||||
// ExpirationOptions represents object options for object expiration at objectLayer.
|
||||
|
||||
Reference in New Issue
Block a user