Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for byte (0.16 sec)

  1. cmd/storage-rest-server.go

    				// concurrently, check for it before we
    				// write the filler byte.
    				select {
    				case err := <-doneCh:
    					if err != nil {
    						write([]byte{1})
    						write([]byte(err.Error()))
    					} else {
    						write([]byte{0})
    					}
    					return
    				default:
    				}
    
    				// Response not ready, write a filler byte.
    				write([]byte{32})
    				if canWrite {
    					w.(http.Flusher).Flush()
    				}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  2. cmd/object-handlers_test.go

    			rangeHdrs := []string{
    				// Read first byte of object
    				fmt.Sprintf("bytes=%d-%d", 0, 0),
    				// Read second byte of object
    				fmt.Sprintf("bytes=%d-%d", 1, 1),
    				// Read last byte of object
    				fmt.Sprintf("bytes=-%d", 1),
    				// Read all but first byte of object
    				"bytes=1-",
    				// Read first half of object
    				fmt.Sprintf("bytes=%d-%d", 0, objLen/2),
    				// Read last half of object
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  3. cmd/erasure-multipart.go

    	var buffer []byte
    	switch size := data.Size(); {
    	case size == 0:
    		buffer = make([]byte, 1) // Allocate at least a byte to reach EOF
    	case size == -1:
    		if size := data.ActualSize(); size > 0 && size < fi.Erasure.BlockSize {
    			// Account for padding and forced compression overhead and encryption.
    			buffer = make([]byte, data.ActualSize()+256+32+32, data.ActualSize()*2+512)
    		} else {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 43K bytes
    - Viewed (0)
  4. cmd/xl-storage.go

    	}
    	return buf, stat.ModTime().UTC(), err
    }
    
    func (s *xlStorage) readMetadata(ctx context.Context, itemPath string) ([]byte, error) {
    	return xioutil.WithDeadline[[]byte](ctx, globalDriveConfig.GetMaxTimeout(), func(ctx context.Context) ([]byte, error) {
    		buf, _, err := s.readMetadataWithDMTime(ctx, itemPath)
    		return buf, err
    	})
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  5. cni/pkg/util/podutil.go

    	"k8s.io/client-go/kubernetes"
    
    	"istio.io/api/annotation"
    	"istio.io/istio/pkg/config/constants"
    )
    
    var annotationPatch = []byte(fmt.Sprintf(
    	`{"metadata":{"annotations":{"%s":"%s"}}}`,
    	constants.AmbientRedirection,
    	constants.AmbientRedirectionEnabled,
    ))
    
    var annotationRemovePatch = []byte(fmt.Sprintf(
    	`{"metadata":{"annotations":{"%s":null}}}`,
    	constants.AmbientRedirection,
    ))
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 18:04:40 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  6. cmd/erasure-object.go

    	}
    
    	// Fetch buffer for I/O, returns from the pool if not allocates a new one and returns.
    	var buffer []byte
    	switch size := data.Size(); {
    	case size == 0:
    		buffer = make([]byte, 1) // Allocate at least a byte to reach EOF
    	case size >= fi.Erasure.BlockSize:
    		buffer = globalBytePoolCap.Load().Get()
    		defer globalBytePoolCap.Load().Put(buffer)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 76.9K bytes
    - Viewed (2)
  7. cmd/xl-storage-disk-id-check.go

    func (p *xlStorageDiskIDCheck) ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error) {
    	ctx, done, err := p.TrackDiskHealth(ctx, storageMetricReadAll, volume, path)
    	if err != nil {
    		return nil, err
    	}
    	defer done(&err)
    
    	return xioutil.WithDeadline[[]byte](ctx, globalDriveConfig.GetMaxTimeout(), func(ctx context.Context) (result []byte, err error) {
    		return p.storage.ReadAll(ctx, volume, path)
    	})
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  8. cmd/storage-rest-client.go

    }
    
    // AppendFile - append to a file.
    func (client *storageRESTClient) AppendFile(ctx context.Context, volume string, path string, buf []byte) error {
    	values := make(url.Values)
    	values.Set(storageRESTVolume, volume)
    	values.Set(storageRESTFilePath, path)
    	reader := bytes.NewReader(buf)
    	respBody, err := client.call(ctx, storageRESTMethodAppendFile, values, reader, -1)
    	defer xhttp.DrainBody(respBody)
    	return err
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  9. cmd/erasure-metadata.go

    			return i
    		}
    	}
    	return -1
    }
    
    // AddObjectPart - add a new object part in order.
    func (fi *FileInfo) AddObjectPart(partNumber int, partETag string, partSize, actualSize int64, modTime time.Time, idx []byte, checksums map[string]string) {
    	partInfo := ObjectPartInfo{
    		Number:     partNumber,
    		ETag:       partETag,
    		Size:       partSize,
    		ActualSize: actualSize,
    		ModTime:    modTime,
    		Index:      idx,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  10. cni/pkg/iptables/iptables_test.go

    }
    
    func ipstr(ipv6 bool) string {
    	if ipv6 {
    		return "ipv6"
    	}
    	return "ipv4"
    }
    
    func compareToGolden(t *testing.T, ipv6 bool, name string, actual []string) {
    	t.Helper()
    	gotBytes := []byte(strings.Join(actual, "\n"))
    	goldenFile := filepath.Join("testdata", name+".golden")
    	if ipv6 {
    		goldenFile = filepath.Join("testdata", name+"_ipv6.golden")
    	}
    	testutil.CompareContent(t, gotBytes, goldenFile)
    }
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.7K bytes
    - Viewed (0)
Back to top