Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for checkPrecondFn (0.15 sec)

  1. cmd/erasure-multipart-conditional_test.go

    		// Since read quorum fails, we can't determine if object exists.
    		opts := ObjectOptions{
    			UserDefined: map[string]string{
    				xhttp.IfNoneMatch: "*",
    			},
    			CheckPrecondFn: func(oi ObjectInfo) bool {
    				// Precondition fails if object exists (ETag is not empty)
    				return oi.ETag != ""
    			},
    		}
    
    		_, err := obj.NewMultipartUpload(ctx, bucket, object, opts)
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Oct 24 04:05:31 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  2. cmd/erasure-object-conditional_test.go

    		// Since read quorum fails, we can't determine if object exists.
    		opts := ObjectOptions{
    			UserDefined: map[string]string{
    				xhttp.IfNoneMatch: "*",
    			},
    			CheckPrecondFn: func(oi ObjectInfo) bool {
    				// Precondition fails if object exists (ETag is not empty)
    				return oi.ETag != ""
    			},
    		}
    
    		_, err := obj.PutObject(ctx, bucket, object,
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Oct 24 04:05:31 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  3. cmd/erasure-multipart.go

    // operation(s) on the object.
    func (er erasureObjects) newMultipartUpload(ctx context.Context, bucket string, object string, opts ObjectOptions) (*NewMultipartUploadResult, error) {
    	if opts.CheckPrecondFn != nil {
    		if !opts.NoLock {
    			ns := er.NewNSLock(bucket, object)
    			lkctx, err := ns.GetLock(ctx, globalOperationTimeout)
    			if err != nil {
    				return nil, err
    			}
    			ctx = lkctx.Context()
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Oct 24 04:05:31 UTC 2025
    - 47.1K bytes
    - Viewed (0)
  4. cmd/erasure-object.go

    	if !opts.NoAuditLog {
    		auditObjectErasureSet(ctx, "PutObject", object, &er)
    	}
    
    	data := r.Reader
    
    	if opts.CheckPrecondFn != nil {
    		if !opts.NoLock {
    			ns := er.NewNSLock(bucket, object)
    			lkctx, err := ns.GetLock(ctx, globalOperationTimeout)
    			if err != nil {
    				return ObjectInfo{}, err
    			}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Oct 24 04:05:31 UTC 2025
    - 80.4K bytes
    - Viewed (0)
Back to top