Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 208 for newHeader (0.07 sec)

  1. cmd/bitrot-streaming.go

    		if len(b.data) == 0 && b.tillOffset != streamOffset {
    			b.rc, err = b.disk.ReadFileStream(context.TODO(), b.volume, b.filePath, streamOffset, b.tillOffset-streamOffset)
    		} else {
    			b.rc = io.NewSectionReader(bytes.NewReader(b.data), streamOffset, b.tillOffset-streamOffset)
    		}
    		if err != nil {
    			return 0, err
    		}
    	}
    	if offset != b.currOffset {
    		// Can never happen unless there are programmer bugs
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 12:20:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. internal/ioutil/ioutil_test.go

    func TestCopyAligned(t *testing.T) {
    	f, err := os.CreateTemp("", "")
    	if err != nil {
    		t.Errorf("Error creating tmp file: %v", err)
    	}
    	defer f.Close()
    	defer os.Remove(f.Name())
    
    	r := strings.NewReader("hello world")
    
    	bufp := ODirectPoolSmall.Get().(*[]byte)
    	defer ODirectPoolSmall.Put(bufp)
    
    	written, err := CopyAligned(f, io.LimitReader(r, 5), *bufp, r.Size(), f)
    	if !errors.Is(err, io.ErrUnexpectedEOF) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. internal/config/lambda/target/webhook.go

    		return nil, err
    	}
    
    	data, err := json.Marshal(eventData)
    	if err != nil {
    		return nil, err
    	}
    
    	req, err := http.NewRequest(http.MethodPost, target.args.Endpoint.String(), bytes.NewReader(data))
    	if err != nil {
    		return nil, err
    	}
    
    	// Verify if the authToken already contains
    	// <Key> <Token> like format, if this is
    	// already present we can blindly use the
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 08 21:39:49 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. cmd/admin-handlers-idp-config.go

    	}
    
    	cfg, err := readServerConfig(ctx, objectAPI, nil)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	dynamic, err := cfg.ReadConfig(strings.NewReader(cfgData))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	// IDP config is not dynamic. Sanity check.
    	if dynamic {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. internal/bucket/replication/replication_test.go

    			expectedValidationErr: nil,
    		},
    	}
    	for i, tc := range testCases {
    		t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) {
    			cfg, err := ParseConfig(bytes.NewReader([]byte(tc.inputConfig)))
    			if err != nil && tc.expectedParsingErr != nil && err.Error() != tc.expectedParsingErr.Error() {
    				t.Fatalf("%d: Expected '%v' during parsing but got '%v'", i+1, tc.expectedParsingErr, err)
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Mar 28 17:44:56 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  6. src/bytes/example_test.go

    	// Output:
    	// 'Gjnf oevyyvt naq gur fyvgul tbcure...
    }
    
    func ExampleReader_Len() {
    	fmt.Println(bytes.NewReader([]byte("Hi!")).Len())
    	fmt.Println(bytes.NewReader([]byte("こんにちは!")).Len())
    	// Output:
    	// 3
    	// 16
    }
    
    func ExampleRepeat() {
    	fmt.Printf("ba%s", bytes.Repeat([]byte("na"), 2))
    	// Output: banana
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 07 17:22:36 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/base/FinalizableReferenceQueue.java

           * Finalizer.class -> CustomClassLoader -> CustomClassLoader.class -> This class loader
           *
           * System class loader will (and must) be the parent.
           */
          try (URLClassLoader finalizerLoader = newLoader(getBaseUrl())) {
            return finalizerLoader.loadClass(FINALIZER_CLASS_NAME);
          } catch (Exception e) {
            logger.log(Level.WARNING, LOADING_ERROR, e);
            return null;
          }
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jul 11 20:51:36 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  8. cmd/erasure-healing-common.go

    		}
    
    		// Always check data, if we got it.
    		if (len(meta.Data) > 0 || meta.Size == 0) && len(meta.Parts) > 0 {
    			checksumInfo := meta.Erasure.GetChecksumInfo(meta.Parts[0].Number)
    			verifyErr := bitrotVerify(bytes.NewReader(meta.Data),
    				int64(len(meta.Data)),
    				meta.Erasure.ShardFileSize(meta.Size),
    				checksumInfo.Algorithm,
    				checksumInfo.Hash, meta.Erasure.ShardSize())
    			dataErrsByPart[0][i] = convPartErrToInt(verifyErr)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool-decom.go

    		parts := make([]CompletePart, len(objInfo.Parts))
    		for i, part := range objInfo.Parts {
    			hr, err := hash.NewReader(ctx, io.LimitReader(gr, part.Size), part.Size, "", "", part.ActualSize)
    			if err != nil {
    				return fmt.Errorf("decommissionObject: hash.NewReader() %w", err)
    			}
    			pi, err := z.PutObjectPart(ctx, bucket, objInfo.Name, res.UploadID,
    				part.Number,
    				NewPutObjReader(hr),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 13:20:19 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  10. cmd/admin-handlers_test.go

    	// Test all combinations!
    	for pIdx, params := range qParamsArr {
    		for vIdx, vars := range varsArr {
    			_, err := extractHealInitParams(vars, params, bytes.NewReader([]byte(body)))
    			isErrCase := false
    			if pIdx < 4 || vIdx < 1 {
    				isErrCase = true
    			}
    
    			if err != ErrNone && !isErrCase {
    				t.Errorf("Got unexpected error: %v %v %v", pIdx, vIdx, err)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 13.9K bytes
    - Viewed (0)
Back to top