Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ReadFile (0.18 sec)

  1. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 10K bytes
    - Viewed (0)
  2. cmd/common-main.go

    				// if so, decrypt it using the user-provided password.
    				certBytes, err := os.ReadFile(certFile)
    				if err != nil {
    					return tls.Certificate{}, fmt.Errorf("Unable to load KES client certificate as specified by the shell environment: %v", err)
    				}
    				keyBytes, err := os.ReadFile(keyFile)
    				if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  3. cmd/utils.go

    			return nil, err
    		}
    		prof.stopFn = func() ([]byte, error) {
    			pprof.StopCPUProfile()
    			err := f.Close()
    			if err != nil {
    				return nil, err
    			}
    			defer RemoveAll(dirPath)
    			return ioutilx.ReadFile(fn)
    		}
    	case madmin.ProfilerCPUIO:
    		// at 10k or more goroutines fgprof is likely to become
    		// unable to maintain its sampling rate and to significantly
    		// degrade the performance of your application
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 31.4K bytes
    - Viewed (0)
  4. cmd/storage-rest-client.go

    	respBody, err := client.call(ctx, storageRESTMethodReadFileStream, values, nil, -1)
    	if err != nil {
    		return nil, err
    	}
    	return respBody, nil
    }
    
    // ReadFile - reads section of a file.
    func (client *storageRESTClient) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (int64, error) {
    	values := make(url.Values)
    	values.Set(storageRESTVolume, volume)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  5. istioctl/pkg/ztunnelconfig/ztunnelconfig.go

    	debug, err := extractZtunnelConfigDump(kubeClient, podName, podNamespace)
    	if err != nil {
    		return nil, err
    	}
    	return setupConfigdumpZtunnelConfigWriter(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 May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 01 13:11:40 GMT 2024
    - 22.2K bytes
    - Viewed (0)
  6. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  7. docs/debugging/xl-meta/main.go

    	filled := make([]byte, size)
    	parityData := make(map[int]map[int][]byte)
    	fmt.Printf("Attempting to combine version %q.\n", out)
    	for _, file := range files {
    		b, err := os.ReadFile(file)
    		if err != nil {
    			return err
    		}
    		meta, err := os.ReadFile(file + ".json")
    		if err != nil {
    			return err
    		}
    		type erasureInfo struct {
    			V2Obj *struct {
    				EcDist  []int
    				EcIndex int
    				EcM     int
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  8. cmd/xl-storage-disk-id-check.go

    		return nil, err
    	}
    	defer done(&err)
    
    	return p.storage.ListDir(ctx, origvolume, volume, dirPath, count)
    }
    
    // Legacy API - does not have any deadlines
    func (p *xlStorageDiskIDCheck) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) {
    	ctx, done, err := p.TrackDiskHealth(ctx, storageMetricReadFile, volume, path)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  9. cmd/server-main.go

    		ctxt.SFTP = append(ctxt.SFTP, fmt.Sprintf("ssh-private-key=%s", cf.Options.SFTP.SSHPrivateKey))
    	}
    }
    
    func mergeServerCtxtFromConfigFile(configFile string, ctxt *serverCtxt) error {
    	rd, err := xioutil.ReadFile(configFile)
    	if err != nil {
    		return err
    	}
    
    	cfReader := bytes.NewReader(rd)
    
    	cv := config.ServerConfigVersion{}
    	if err = yaml.Unmarshal(rd, &cv); err != nil {
    		return err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 34.9K bytes
    - Viewed (1)
  10. cmd/storage-rest-server.go

    		}
    		verifier = NewBitrotVerifier(BitrotAlgorithmFromString(r.Form.Get(storageRESTBitrotAlgo)), hash)
    	}
    	buf := make([]byte, length)
    	defer metaDataPoolPut(buf) // Reuse if we can.
    	_, err = s.getStorage().ReadFile(r.Context(), volume, filePath, int64(offset), buf, verifier)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    	w.Header().Set(xhttp.ContentLength, strconv.Itoa(len(buf)))
    	w.Write(buf)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
Back to top