Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for asStream (0.17 sec)

  1. cmd/test-utils_test.go

    		signature = hex.EncodeToString(sumHMAC(signingKey, []byte(stringToSign)))
    
    		stream = append(stream, []byte(fmt.Sprintf("%x", n)+";chunk-signature="+signature+"\r\n")...)
    		stream = append(stream, buffer[:n]...)
    		stream = append(stream, []byte("\r\n")...)
    
    		if n <= 0 {
    			break
    		}
    
    	}
    	req.Body = io.NopCloser(bytes.NewReader(stream))
    	return req, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  2. internal/grid/grid_test.go

    	start := time.Now()
    	stream, err := handler.Call(context.Background(), remoteConn, &testRequest{Num: 1, String: testPayload})
    	errFatal(err)
    	go func() {
    		defer close(stream.Requests)
    		for i := 0; i < payloads; i++ {
    			// t.Log("sending new client request")
    			stream.Requests <- &testRequest{Num: i, String: testPayload}
    		}
    	}()
    	var n int
    	err = stream.Results(func(resp *testResponse) error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:03:35 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  3. cmd/storage-rest-server.go

    	}
    	tmp := make([]byte, len(b))
    	copy(tmp, b)
    	h.block <- tmp
    	return len(b), h.err
    }
    
    // CloseWithError will close the stream and return the specified error.
    // This can be done several times, but only the first error will be sent.
    // After calling this the stream should not be written to.
    func (h *httpStreamResponse) CloseWithError(err error) {
    	if h.done == nil {
    		return
    	}
    	h.done <- err
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  4. cmd/xl-storage.go

    		default:
    			return nil, err
    		}
    	}
    
    	return w, nil
    }
    
    type sendFileReader struct {
    	io.Reader
    	io.Closer
    }
    
    // ReadFileStream - Returns the read stream of the file.
    func (s *xlStorage) ReadFileStream(ctx context.Context, volume, path string, offset, length int64) (io.ReadCloser, error) {
    	if offset < 0 {
    		return nil, errInvalidArgument
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  5. cmd/object-handlers.go

    	case authTypeStreamingSigned, authTypeStreamingSignedTrailer:
    		// Initialize stream signature verifier.
    		rd, s3Err = newSignV4ChunkedReader(r, rAuthType == authTypeStreamingSignedTrailer)
    		if s3Err != ErrNone {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL)
    			return
    		}
    	case authTypeStreamingUnsignedTrailer:
    		// Initialize stream chunked reader with optional trailers.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 20:15:54 GMT 2024
    - 125.2K bytes
    - Viewed (0)
  6. cmd/erasure-object.go

    	}
    
    	return fi.ToObjectInfo(minioMetaBucket, key, opts.Versioned || opts.VersionSuspended), nil
    }
    
    // PutObject - creates an object upon reading from the input stream
    // until EOF, erasure codes the data across all disk and additionally
    // writes `xl.meta` which carries the necessary metadata for future
    // object operations.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 77.2K bytes
    - Viewed (2)
  7. cmd/erasure-server-pool.go

    			return &GetObjectReader{
    				ObjInfo: objInfo,
    			}, toObjectErr(errMethodNotAllowed, bucket, object)
    		}
    		return nil, err
    	}
    
    	// check preconditions before reading the stream.
    	if checkPrecondFn != nil && checkPrecondFn(objInfo) {
    		return nil, PreConditionFailed{}
    	}
    
    	opts.NoLock = true
    	gr, err = z.serverPools[zIdx].GetObjectNInfo(ctx, bucket, object, rs, h, opts)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  8. cmd/admin-handlers.go

    	if publicKey != nil {
    		w.WriteHeader(200)
    		stream := estream.NewWriter(w)
    		defer stream.Close()
    
    		clusterKey, err := bytesToPublicKey(getSubnetAdminPublicKey())
    		if err != nil {
    			bugLogIf(ctx, stream.AddError(err.Error()))
    			return
    		}
    		err = stream.AddKeyEncrypted(clusterKey)
    		if err != nil {
    			bugLogIf(ctx, stream.AddError(err.Error()))
    			return
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 29 17:39:04 GMT 2024
    - 97.8K bytes
    - Viewed (2)
  9. cmd/erasure-sets.go

    			return srcSet.CopyObject(ctx, srcBucket, srcObject, dstBucket, dstObject, srcInfo, srcOpts, dstOpts)
    		}
    		// Destination is not versioned and source version ID is empty
    		// perform an in-place update.
    		if !dstOpts.Versioned && srcOpts.VersionID == "" {
    			srcInfo.Reader.Close() // We are not interested in the reader stream at this point close it.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 37.7K bytes
    - Viewed (5)
  10. cmd/admin-handlers-idp-ldap.go

    		return
    	}
    
    	// Ensure body content type is opaque to ensure that request body has not
    	// been interpreted as form data.
    	contentType := r.Header.Get("Content-Type")
    	if contentType != "application/octet-stream" {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrBadRequest), r.URL)
    		return
    	}
    
    	// Validate operation
    	operation := mux.Vars(r)["operation"]
    	if operation != "attach" && operation != "detach" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 13.3K bytes
    - Viewed (0)
Back to top