Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ExpectedExpiryTime (0.48 sec)

  1. internal/bucket/lifecycle/lifecycle.go

    				// once delete markers are old enough to satisfy the age criteria.
    				// https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html
    				if expectedExpiry := ExpectedExpiryTime(obj.ModTime, int(rule.Expiration.Days)); now.IsZero() || now.After(expectedExpiry) {
    					events = append(events, Event{
    						Action: DeleteVersionAction,
    						RuleID: rule.ID,
    						Due:    expectedExpiry,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/delmarker-expiration.go

    // applicable, returns false otherwise.
    func (de DelMarkerExpiration) NextDue(obj ObjectOpts) (time.Time, bool) {
    	if !obj.IsLatest || !obj.DeleteMarker {
    		return time.Time{}, false
    	}
    
    	return ExpectedExpiryTime(obj.ModTime, de.Days), true
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/lifecycle_test.go

    			1,
    			time.Date(2020, time.March, 17, 0, 0, 0, 0, time.UTC),
    		},
    	}
    
    	for i, tc := range testCases {
    		t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) {
    			got := ExpectedExpiryTime(tc.modTime, int(tc.days))
    			if !got.Equal(tc.expected) {
    				t.Fatalf("Expected %v to be equal to %v", got, tc.expected)
    			}
    		})
    	}
    }
    
    func TestEval(t *testing.T) {
    	testCases := []struct {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  4. cmd/bucket-lifecycle.go

    	for k, v := range objInfo.UserDefined {
    		meta[k] = v
    	}
    	if len(objInfo.UserTags) != 0 {
    		meta[xhttp.AmzObjectTagging] = objInfo.UserTags
    	}
    	// Set restore object status
    	restoreExpiry := lifecycle.ExpectedExpiryTime(time.Now().UTC(), rreq.Days)
    	meta[xhttp.AmzRestore] = completedRestoreObj(restoreExpiry).String()
    	return ObjectOptions{
    		Versioned:        globalBucketVersioningSys.PrefixEnabled(bucket, object),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  5. cmd/data-scanner.go

    			// subsequent lifecycle policy applications
    			objectInfos = append(objectInfos, obj)
    			continue
    		}
    
    		// NoncurrentDays not passed yet.
    		if time.Now().UTC().Before(lifecycle.ExpectedExpiryTime(obj.SuccessorModTime, event.NoncurrentDays)) {
    			// add this version back to remaining versions for
    			// subsequent lifecycle policy applications
    			objectInfos = append(objectInfos, obj)
    			continue
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 11:18:58 GMT 2024
    - 47.6K bytes
    - Viewed (0)
  6. cmd/object-handlers.go

    		if !objInfo.RestoreOngoing && !objInfo.RestoreExpires.IsZero() {
    			statusCode = http.StatusAccepted
    			alreadyRestored = true
    		}
    	}
    	// set or upgrade restore expiry
    	restoreExpiry := lifecycle.ExpectedExpiryTime(time.Now().UTC(), rreq.Days)
    	metadata := cloneMSS(objInfo.UserDefined)
    
    	// update self with restore metadata
    	if rreq.Type != SelectRestoreRequest {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 20:15:54 GMT 2024
    - 125.2K bytes
    - Viewed (0)
Back to top