Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 79 for IsZero (5.41 sec)

  1. internal/bucket/bandwidth/measurement.go

    	// Calculate aggregate avg bandwidth and exp window avg
    	m.lock.Lock()
    	defer func() {
    		m.startTime = endTime
    		m.lock.Unlock()
    	}()
    
    	if m.startTime.IsZero() {
    		return
    	}
    
    	if endTime.Before(m.startTime) {
    		return
    	}
    
    	duration := endTime.Sub(m.startTime)
    
    	bytesSinceLastWindow := atomic.SwapUint64(&m.bytesSinceLastWindow, 0)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Jun 03 20:41:51 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/expiration.go

    	return nil
    }
    
    // MarshalXML encodes expiration date if it is non-zero and encodes
    // empty string otherwise
    func (eDate ExpirationDate) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if eDate.Time.IsZero() {
    		return nil
    	}
    	return e.EncodeElement(eDate.Format(time.RFC3339), startElement)
    }
    
    // ExpireDeleteMarker represents value of ExpiredObjectDeleteMarker field in Expiration XML element.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Feb 21 20:28:34 GMT 2024
    - 6.6K bytes
    - Viewed (1)
  3. internal/config/cache/remote.go

    }
    
    // WriteHeaders writes the response headers for conditional requests
    func (oi ObjectInfo) WriteHeaders(w http.ResponseWriter, preamble, statusCode func()) {
    	preamble()
    
    	if !oi.ModTime.IsZero() {
    		w.Header().Set(xhttp.LastModified, oi.ModTime.UTC().Format(http.TimeFormat))
    	}
    
    	if oi.ETag != "" {
    		w.Header()[xhttp.ETag] = []string{"\"" + oi.ETag + "\""}
    	}
    
    	if oi.Expires != "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Nov 22 21:46:17 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. src/archive/tar/writer.go

    	var spd sparseDatas
    	var spb []byte
    	blk := tw.templateV7Plus(hdr, f.formatString, f.formatNumeric)
    	if !hdr.AccessTime.IsZero() {
    		f.formatNumeric(blk.toGNU().accessTime(), hdr.AccessTime.Unix())
    	}
    	if !hdr.ChangeTime.IsZero() {
    		f.formatNumeric(blk.toGNU().changeTime(), hdr.ChangeTime.Unix())
    	}
    	// TODO(dsnet): Re-enable this when adding sparse support.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  5. utils/utils.go

    		case []byte:
    			results[idx] = string(v)
    		case uint:
    			results[idx] = strconv.FormatUint(uint64(v), 10)
    		default:
    			results[idx] = "nil"
    			vv := reflect.ValueOf(v)
    			if vv.IsValid() && !vv.IsZero() {
    				results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface())
    			}
    		}
    	}
    
    	return strings.Join(results, "_")
    }
    
    func Contains(elems []string, elem string) bool {
    	for _, e := range elems {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. cmd/metrics.go

    	bgSeq, exists := globalBackgroundHealState.getHealSequenceByToken(bgHealingUUID)
    	if !exists {
    		return
    	}
    
    	var dur time.Duration
    	if !bgSeq.lastHealActivity.IsZero() {
    		dur = time.Since(bgSeq.lastHealActivity)
    	}
    
    	ch <- prometheus.MustNewConstMetric(
    		prometheus.NewDesc(
    			prometheus.BuildFQName(healMetricsNamespace, "time", "since_last_activity"),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 02 06:48:36 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  7. tests/soft_delete_test.go

    	}
    
    	if err := DB.Delete(&user).Error; err != nil {
    		t.Fatalf("No error should happen when soft delete user, but got %v", err)
    	}
    
    	if sql.NullTime(user.DeletedAt).Time.IsZero() {
    		t.Fatalf("user's deleted at is zero")
    	}
    
    	sql := DB.Session(&gorm.Session{DryRun: true}).Delete(&user).Statement.SQL.String()
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  8. internal/amztime/parse.go

    // ParseReplicationTS parse http.TimeFormat first
    // will try time.RFC3339Nano when parse http.TimeFormat failed
    func ParseReplicationTS(str string) (time.Time, error) {
    	tm, err := time.Parse(http.TimeFormat, str)
    	if tm.IsZero() || err != nil {
    		tm, err = time.Parse(time.RFC3339Nano, str)
    	}
    	return tm, err
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool-rebalance.go

    	defer z.rebalMu.RUnlock()
    
    	if r := z.rebalMeta; r != nil {
    		if r.StoppedAt.IsZero() {
    			return true
    		}
    	}
    	return false
    }
    
    func (z *erasureServerPools) IsPoolRebalancing(poolIndex int) bool {
    	z.rebalMu.RLock()
    	defer z.rebalMu.RUnlock()
    
    	if r := z.rebalMeta; r != nil {
    		if !r.StoppedAt.IsZero() {
    			return false
    		}
    		ps := z.rebalMeta.PoolStats[poolIndex]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. cmd/batch-rotate.go

    			return false
    		}
    
    		if !r.Flags.Filter.CreatedAfter.IsZero() && r.Flags.Filter.CreatedAfter.Before(info.ModTime) {
    			// skip all objects that are created before the specified time.
    			return false
    		}
    
    		if !r.Flags.Filter.CreatedBefore.IsZero() && r.Flags.Filter.CreatedBefore.After(info.ModTime) {
    			// skip all objects that are created after the specified time.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top