Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for addState (0.04 sec)

  1. okhttp/src/test/java/okhttp3/HeadersJvmTest.kt

        ).isEqualTo(10L)
        assertThat(
          Headers.Builder()
            .add("abc", "def")
            .add("ghi", "jkl")
            .build()
            .byteCount(),
        ).isEqualTo(20L)
      }
    
      @Test fun addDate() {
        val expected = Date(0L)
        val headers =
          Headers.Builder()
            .add("testDate", expected)
            .build()
        assertThat(headers["testDate"]).isEqualTo("Thu, 01 Jan 1970 00:00:00 GMT")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. cmd/tier-last-day-stats.go

    	"time"
    
    	"github.com/minio/madmin-go/v3"
    )
    
    //go:generate msgp -file=$GOFILE -unexported
    
    type lastDayTierStats struct {
    	Bins      [24]tierStats
    	UpdatedAt time.Time
    }
    
    func (l *lastDayTierStats) addStats(ts tierStats) {
    	now := time.Now()
    	l.forwardTo(now)
    
    	nowIdx := now.Hour()
    	l.Bins[nowIdx] = l.Bins[nowIdx].add(ts)
    }
    
    // forwardTo moves time to t, clearing entries between last update and t.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. cmd/signature-v4_test.go

    			expected: ErrUnsignedHeaders,
    		},
    		// (4) Should give an expired request if it has expired.
    		{
    			queryParams: map[string]string{
    				"X-Amz-Algorithm":      signV4Algorithm,
    				"X-Amz-Date":           now.AddDate(0, 0, -2).Format(iso8601Format),
    				"X-Amz-Expires":        "60",
    				"X-Amz-Signature":      "badsignature",
    				"X-Amz-SignedHeaders":  "host;x-amz-content-sha256;x-amz-date",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  4. internal/bucket/object/lock/lock.go

    			// Do not change any configuration
    			// upon NTP failure.
    			return r
    		}
    
    		if config.Rule.DefaultRetention.Days != nil {
    			r.Validity = t.AddDate(0, 0, int(*config.Rule.DefaultRetention.Days)).Sub(t)
    		} else {
    			r.Validity = t.AddDate(int(*config.Rule.DefaultRetention.Years), 0, 0).Sub(t)
    		}
    	}
    
    	return r
    }
    
    // Maximum 4KiB size per object lock config.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  5. cmd/bucket-replication-handlers.go

    				Bucket: bucket,
    				Err:    fmt.Errorf("invalid query parameter older-than %s for %s : %w", durationStr, bucket, err),
    			}), r.URL)
    			return
    		}
    	}
    	resetBeforeDate := UTCNow().AddDate(0, 0, -1*int(days/24))
    
    	objectAPI := api.ObjectAPI()
    	if objectAPI == nil {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL)
    		return
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  6. cmd/bucket-lifecycle.go

    	t.lastDayMu.Lock()
    	defer t.lastDayMu.Unlock()
    
    	if _, ok := t.lastDayStats[tier]; !ok {
    		t.lastDayStats[tier] = &lastDayTierStats{}
    	}
    	t.lastDayStats[tier].addStats(ts)
    }
    
    func (t *transitionState) getDailyAllTierStats() DailyAllTierStats {
    	t.lastDayMu.RLock()
    	defer t.lastDayMu.RUnlock()
    
    	res := make(DailyAllTierStats, len(t.lastDayStats))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 23 15:35:37 UTC 2024
    - 33.7K bytes
    - Viewed (0)
Back to top