Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 116 for wang (0.14 sec)

  1. cmd/data-usage-cache_test.go

    	tests := []struct {
    		sizes []int64
    		want  map[string]uint64
    	}{
    		{
    			sizes: []int64{100, 1000, 72_000, 100_000},
    			want: map[string]uint64{
    				"LESS_THAN_1024_B":         2,
    				"BETWEEN_64_KB_AND_256_KB": 2,
    				"BETWEEN_1024B_AND_1_MB":   2,
    			},
    		},
    		{
    			sizes: []int64{100, 1000, 2000, 100_000, 13 * humanize.MiByte},
    			want: map[string]uint64{
    				"LESS_THAN_1024_B":         2,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Jan 13 07:51:08 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. internal/grid/grid_test.go

    		t.Log("Roundtrip:", time.Since(start))
    		if len(resp) != 0 {
    			t.Errorf("want nil, got %q", string(resp))
    		}
    		if err != RemoteErr(testPayload) {
    			t.Errorf("want error %v(%T), got %v(%T)", RemoteErr(testPayload), RemoteErr(testPayload), err, err)
    		}
    		t.Log("Roundtrip:", time.Since(start))
    	})
    
    	t.Run("localToRemoteHuge", func(t *testing.T) {
    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. internal/grid/msg.go

    		const hashLen = 4
    		if len(h) < hashLen {
    			return nil, nil, fmt.Errorf("want crc len 4, got %v", len(h))
    		}
    		got := uint32(xxh3.Hash(b[:len(b)-hashLen]))
    		want := binary.LittleEndian.Uint32(h[len(h)-hashLen:])
    		if got != want {
    			return nil, nil, fmt.Errorf("crc mismatch: 0x%08x (given) != 0x%08x (bytes)", want, got)
    		}
    		h = h[:len(h)-hashLen]
    	}
    	// Extract subroute if any.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 28 19:22:29 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  4. internal/handlers/proxy_test.go

    	for _, v := range headers {
    		req := &http.Request{
    			Header: http.Header{
    				v.key: []string{v.val},
    			},
    		}
    		res := GetSourceScheme(req)
    		if res != v.expected {
    			t.Errorf("wrong header for %s: got %s want %s", v.key, res,
    				v.expected)
    		}
    	}
    }
    
    // TestGetSourceIP - check the source ip of a request is parsed correctly.
    func TestGetSourceIP(t *testing.T) {
    	headers := []headerTest{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 22 00:56:55 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. cmd/bitrot.go

    func bitrotVerify(r io.Reader, wantSize, partSize int64, algo BitrotAlgorithm, want []byte, shardSize int64) error {
    	if algo != HighwayHash256S {
    		h := algo.New()
    		if n, err := io.Copy(h, r); err != nil || n != wantSize {
    			// Premature failure in reading the object, file is corrupt.
    			return errFileCorrupt
    		}
    		if !bytes.Equal(h.Sum(nil), want) {
    			return errFileCorrupt
    		}
    		return nil
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  6. cmd/streaming-signature-v4.go

    	if b != '\r' || err != nil {
    		if cr.debug {
    			fmt.Printf("want %q, got %q\n", "\r", string(b))
    		}
    		cr.err = errMalformedEncoding
    		return n, cr.err
    	}
    	b, err = cr.reader.ReadByte()
    	if err == io.EOF {
    		err = io.ErrUnexpectedEOF
    	}
    	if err != nil {
    		cr.err = err
    		return n, cr.err
    	}
    	if b != '\n' {
    		if cr.debug {
    			fmt.Printf("want %q, got %q\n", "\r", string(b))
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  7. cmd/erasure_test.go

    				t.Errorf("Test %d: failed to write data blocks: %v", i, err)
    			}
    			if !bytes.Equal(decodedData.Bytes(), data) {
    				t.Errorf("Test %d: Decoded data does not match original data: got: %v want: %v", i, decodedData.Bytes(), data)
    			}
    		}
    	}
    }
    
    // Setup for erasureCreateFile and erasureReadFile tests.
    type erasureTestSetup struct {
    	dataBlocks   int
    	parityBlocks int
    	blockSize    int64
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  8. internal/logger/logrotate.go

    	// may fall on the same timestamp.
    	// Eg.
    	// 	2020-03-28_15-00-945-<random-hash>.log
    	// When FileNameFunc is not specified, DefaultFilenameFunc will be used.
    	FileNameFunc func() string
    
    	// Compress specify if you want the logs to be compressed after rotation.
    	Compress bool
    }
    
    // Writer is a concurrency-safe writer with file rotation.
    type Writer struct {
    	// opts are the configuration options for this Writer
    	opts Options
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 11:38:40 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. cmd/object-api-listobjects_test.go

    				// otherwise it may lead to index out of range error in
    				// assertion following this.
    				if !testCase.versioned {
    					if len(testCase.resultL.Objects) != len(resultL.Objects) {
    						t.Logf("want: %v", objInfoNames(testCase.resultL.Objects))
    						t.Logf("got: %v", objInfoNames(resultL.Objects))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 73.1K bytes
    - Viewed (0)
  10. docs/ftp/README.md

    Default port '8021' can be changed via
    
    ```
    --ftp="address=:3021"
    ```
    
    ### Change FTP passive port range
    
    By default FTP requests OS to give a free port automatically, however you may want to restrict
    this to specific ports in certain restricted environments via
    
    ```
    --ftp="passive-port-range=30000-40000"
    ```
    
    ### Change default SFTP port
    
    Default port '8022' can be changed via
    
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:15:45 GMT 2024
    - 7.1K bytes
    - Viewed (0)
Back to top