Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ExpectedExpiryTime (0.12 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,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  2. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  3. 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),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 23 15:35:37 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  4. 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
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 21:10:34 UTC 2024
    - 48.4K bytes
    - Viewed (0)
  5. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
Back to top