Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for Int64 (0.21 sec)

  1. internal/ioutil/ioutil.go

    type LimitWriter struct {
    	io.Writer
    	skipBytes int64
    	wLimit    int64
    }
    
    // Write implements the io.Writer interface limiting upto
    // configured length, also skips the first N bytes.
    func (w *LimitWriter) Write(p []byte) (n int, err error) {
    	n = len(p)
    	var n1 int
    	if w.skipBytes > 0 {
    		if w.skipBytes >= int64(len(p)) {
    			w.skipBytes -= int64(len(p))
    			return n, nil
    		}
    		p = p[w.skipBytes:]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  2. cmd/sftp-server-driver.go

    	r      *io.PipeReader
    	wg     *sync.WaitGroup
    	buffer map[int64][]byte
    	err    error
    
    	nextOffset int64
    	m          sync.Mutex
    }
    
    func (w *writerAt) WriteAt(b []byte, offset int64) (n int, err error) {
    	w.m.Lock()
    	defer w.m.Unlock()
    
    	if w.nextOffset == offset {
    		n, err = w.w.Write(b)
    		w.nextOffset += int64(n)
    	} else {
    		w.buffer[offset] = make([]byte, len(b))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 12:23:42 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  3. cmd/erasure-metadata.go

    // ShardFileSize - returns final erasure size from original size.
    func (e ErasureInfo) ShardFileSize(totalLength int64) int64 {
    	if totalLength == 0 {
    		return 0
    	}
    	if totalLength == -1 {
    		return -1
    	}
    	numShards := totalLength / e.BlockSize
    	lastBlockSize := totalLength % e.BlockSize
    	lastShardSize := ceilFrac(lastBlockSize, int64(e.DataBlocks))
    	return numShards*e.ShardSize() + lastShardSize
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  4. cmd/xl-storage-disk-id-check.go

    	ctx, done, err := p.TrackDiskHealth(ctx, storageMetricReadFile, volume, path)
    	if err != nil {
    		return 0, err
    	}
    	defer done(&err)
    
    	return xioutil.WithDeadline[int64](ctx, globalDriveConfig.GetMaxTimeout(), func(ctx context.Context) (result int64, err error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  5. internal/auth/credentials.go

    // ExpToInt64 - convert input interface value to int64.
    func ExpToInt64(expI interface{}) (expAt int64, err error) {
    	switch exp := expI.(type) {
    	case string:
    		expAt, err = strconv.ParseInt(exp, 10, 64)
    	case float64:
    		expAt, err = int64(exp), nil
    	case int64:
    		expAt, err = exp, nil
    	case int:
    		expAt, err = int64(exp), nil
    	case uint64:
    		expAt, err = int64(exp), nil
    	case uint:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 12:41:13 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  6. internal/rest/client.go

    	if body != nil {
    		switch v := body.(type) {
    		case *bytes.Buffer:
    			req.ContentLength = int64(v.Len())
    			buf := v.Bytes()
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := bytes.NewReader(buf)
    				return io.NopCloser(r), nil
    			}
    		case *bytes.Reader:
    			req.ContentLength = int64(v.Len())
    			snapshot := *v
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := snapshot
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  7. cmd/postpolicyform.go

    }
    
    // toInteger _ Safely convert interface to integer without causing panic.
    func toInteger(val interface{}) (int64, error) {
    	switch v := val.(type) {
    	case float64:
    		return int64(v), nil
    	case int64:
    		return v, nil
    	case int:
    		return int64(v), nil
    	case string:
    		i, err := strconv.Atoi(v)
    		return int64(i), err
    	default:
    		return 0, errors.New("Invalid number format")
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool-decom.go

    	Object string `json:"-" msg:"obj"`
    
    	// Verbose information
    	ItemsDecommissioned     int64 `json:"objectsDecommissioned" msg:"id"`
    	ItemsDecommissionFailed int64 `json:"objectsDecommissionedFailed" msg:"idf"`
    	BytesDone               int64 `json:"bytesDecommissioned" msg:"bd"`
    	BytesFailed             int64 `json:"bytesDecommissionedFailed" msg:"bf"`
    }
    
    // Clone make a copy of PoolDecommissionInfo
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 41.5K bytes
    - Viewed (1)
  9. migrator/migrator.go

    	DB                          *gorm.DB
    	gorm.Dialector
    }
    
    type printSQLLogger struct {
    	logger.Interface
    }
    
    func (l *printSQLLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
    	sql, _ := fc()
    	fmt.Println(sql + ";")
    	l.Interface.Trace(ctx, begin, fc, err)
    }
    
    // GormDataTypeInterface gorm data type interface
    type GormDataTypeInterface interface {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  10. cmd/data-scanner.go

    	} // Has the object been selected for heal check?
    	debug bool
    }
    
    type sizeSummary struct {
    	totalSize       int64
    	versions        uint64
    	deleteMarkers   uint64
    	replicatedSize  int64
    	replicatedCount int64
    	pendingSize     int64
    	failedSize      int64
    	replicaSize     int64
    	replicaCount    int64
    	pendingCount    uint64
    	failedCount     uint64
    	replTargetStats map[string]replTargetSizeSummary
    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)
Back to top