Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for readFile (0.21 sec)

  1. cmd/metacache-walk.go

    				meta.name = decodeDirObject(meta.name)
    
    				return send(meta)
    			}
    			// Check legacy.
    			if HasSuffix(entry, xlStorageFormatFileV1) && legacy {
    				var meta metaCacheEntry
    				meta.metadata, err = xioutil.ReadFile(pathJoinBuf(sb, volumeDir, current, entry))
    				diskHealthCheckOK(ctx, err)
    				if err != nil {
    					if !IsErrIgnored(err, io.EOF, io.ErrUnexpectedEOF) {
    						internalLogIf(ctx, err)
    					}
    					continue
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  2. cmd/naughty-disk_test.go

    	}
    	return d.disk.ListDir(ctx, origvolume, volume, dirPath, count)
    }
    
    func (d *naughtyDisk) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) {
    	if err := d.calcError(); err != nil {
    		return 0, err
    	}
    	return d.disk.ReadFile(ctx, volume, path, offset, buf, verifier)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. istioctl/pkg/waypoint/waypoint_test.go

    				t.Fatal(err)
    			}
    
    			for _, gw := range tt.gateways {
    				_, _ = client.GatewayAPI().GatewayV1().Gateways(gw.Namespace).Create(context.Background(), gw, metav1.CreateOptions{})
    			}
    			defaultFile, err := os.ReadFile(fmt.Sprintf("testdata/waypoint/%s", tt.expectedOutFile))
    			if err != nil {
    				t.Fatal(err)
    			}
    			expectedOut := string(defaultFile)
    			if len(expectedOut) == 0 {
    				t.Fatal("expected output is empty")
    			}
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Apr 04 15:53:09 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  4. istioctl/pkg/proxyconfig/proxyconfig_test.go

    	expectedString string // String output is expected to contain
    
    	wantException bool
    }
    
    func TestProxyConfig(t *testing.T) {
    	loggingConfig := map[string][]byte{
    		"details-v1-5b7f94f9bc-wp5tb": util.ReadFile(t, "../writer/envoy/logging/testdata/logging.txt"),
    		"httpbin-794b576b6c-qx6pf":    []byte("{}"),
    	}
    	cases := []execTestCase{
    		{
    			args:           []string{},
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Apr 10 21:51:29 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  5. cmd/handler-api.go

    	cgroupV2MemLimitFile = "/sys/fs/cgroup/memory.max"
    	cgroupMemNoLimit     = 9223372036854771712
    )
    
    func cgroupMemLimit() (limit uint64) {
    	buf, err := os.ReadFile(cgroupV2MemLimitFile)
    	if err != nil {
    		buf, err = os.ReadFile(cgroupV1MemLimitFile)
    	}
    	if err != nil {
    		return 0
    	}
    	limit, err = strconv.ParseUint(strings.TrimSpace(string(buf)), 10, 64)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  6. cmd/storage-interface.go

    	// File operations.
    	ListDir(ctx context.Context, origvolume, volume, dirPath string, count int) ([]string, error)
    	ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error)
    	AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  7. cmd/xl-storage_test.go

    		}
    	}
    
    	{
    		buf := make([]byte, 5)
    		// Test for negative offset.
    		if _, err = xlStorage.ReadFile(context.Background(), volume, "myobject", -1, buf, v); err == nil {
    			t.Fatalf("expected: error, got: <nil>")
    		}
    	}
    
    	for l := 0; l < 2; l++ {
    		// Following block validates all ReadFile test cases.
    		for i, testCase := range testCases {
    			var n int64
    			// Common read buffer.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 66.7K bytes
    - Viewed (0)
  8. cmd/xl-storage.go

    // tries to verify whether the disk has bitrot.
    //
    // Additionally ReadFile also starts reading from an offset. ReadFile
    // semantics are same as io.ReadFull.
    func (s *xlStorage) ReadFile(ctx context.Context, volume string, path string, offset int64, buffer []byte, verifier *BitrotVerifier) (int64, error) {
    	if offset < 0 {
    		return 0, errInvalidArgument
    	}
    
    	volumeDir, err := s.getVolDir(volume)
    	if err != nil {
    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)
  9. cmd/sftp-server.go

    	}
    
    	if sshPrivateKey == "" {
    		logger.Fatal(fmt.Errorf("invalid arguments passed, private key file is mandatory for --sftp='ssh-private-key=path/to/id_ecdsa'"), "unable to start SFTP server")
    	}
    
    	privateBytes, err := os.ReadFile(sshPrivateKey)
    	if err != nil {
    		logger.Fatal(fmt.Errorf("invalid arguments passed, private key file is not accessible: %v", err), "unable to start SFTP server")
    	}
    
    	private, err := ssh.ParsePrivateKey(privateBytes)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  10. istioctl/pkg/proxyconfig/proxyconfig.go

    	debug, err := extractConfigDump(kubeClient, podName, podNamespace, includeEds)
    	if err != nil {
    		return nil, err
    	}
    	return setupConfigdumpEnvoyConfigWriter(debug, out)
    }
    
    func readFile(filename string) ([]byte, error) {
    	file := os.Stdin
    	if filename != "-" {
    		var err error
    		file, err = os.Open(filename)
    		if err != nil {
    			return nil, err
    		}
    	}
    	defer func() {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 16 03:28:36 GMT 2024
    - 48K bytes
    - Viewed (0)
Back to top