Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewBytesWith (0.06 sec)

  1. internal/grid/types.go

    func NewBytesCap(size int) *Bytes {
    	b := Bytes(GetByteBufferCap(size))
    	return &b
    }
    
    // NewBytesWith returns a new Bytes with the provided content.
    // When sent as a parameter, the caller gives up ownership of the byte slice.
    // When returned as response, the handler also gives up ownership of the byte slice.
    func NewBytesWith(b []byte) *Bytes {
    	bb := Bytes(b)
    	return &bb
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  2. cmd/storage-rest-server.go

    		return nil, grid.NewRemoteErr(errDiskNotFound)
    	}
    
    	volume := p.Volume
    	filePath := p.FilePath
    
    	buf, err := s.getStorage().ReadAll(context.Background(), volume, filePath)
    	return grid.NewBytesWith(buf), grid.NewRemoteErr(err)
    }
    
    // ReadXLHandler - read xl.meta for an object at path.
    func (s *storageRESTServer) ReadXLHandler(w http.ResponseWriter, r *http.Request) {
    	if !s.IsValid(w, r) {
    		return
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 45.7K bytes
    - Viewed (0)
Back to top