Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 191 for pathes (0.4 sec)

  1. docs/debugging/hash-set/main.go

    package main
    
    import (
    	"bufio"
    	"bytes"
    	"encoding/binary"
    	"flag"
    	"fmt"
    	"hash/crc32"
    	"log"
    	"os"
    	"strings"
    
    	"github.com/dchest/siphash"
    	"github.com/google/uuid"
    )
    
    // hashes the key returning an integer based on the input algorithm.
    // This function currently supports
    // - SIPMOD
    func sipHashMod(key string, cardinality int, id [16]byte) int {
    	if cardinality <= 0 {
    		return -1
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. cmd/object-api-utils.go

    	return len(s) > 0 && s[len(s)-1] == suffix
    }
    
    // pathNeedsClean returns whether path.Clean may change the path.
    // Will detect all cases that will be cleaned,
    // but may produce false positives on non-trivial paths.
    func pathNeedsClean(path []byte) bool {
    	if len(path) == 0 {
    		return true
    	}
    
    	rooted := path[0] == '/'
    	n := len(path)
    
    	r, w := 0, 0
    	if rooted {
    		r, w = 1, 1
    	}
    
    	for r < n {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  3. cmd/handler-utils.go

    		bucket := strings.TrimSuffix(xhost.Name, "."+domain)
    		return SlashSeparator + pathJoin(bucket, path), nil
    	}
    	return path, nil
    }
    
    var regexVersion = regexp.MustCompile(`^/minio.*/(v\d+)/.*`)
    
    func extractAPIVersion(r *http.Request) string {
    	if matches := regexVersion.FindStringSubmatch(r.URL.Path); len(matches) > 1 {
    		return matches[1]
    	}
    	return "unknown"
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.5K bytes
    - Viewed (3)
  4. cmd/erasure-sets_test.go

    	defer cancel()
    
    	nDisks := 16 // Maximum disks.
    	var erasureDisks []string
    	for i := 0; i < nDisks; i++ {
    		// Do not attempt to create this path, the test validates
    		// so that newErasureSets initializes non existing paths
    		// and successfully returns initialized object layer.
    		disk := filepath.Join(globalTestTmpDir, "minio-"+nextSuffix())
    		erasureDisks = append(erasureDisks, disk)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 12 07:21:56 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  5. cmd/signature-v2.go

    }
    
    // doesPresignV2SignatureMatch - Verify query headers with presigned signature
    //   - http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
    //
    // returns ErrNone if matches. S3 errors otherwise.
    func doesPresignV2SignatureMatch(r *http.Request) APIErrorCode {
    	// r.RequestURI will have raw encoded URI as sent by the client.
    	tokens := strings.SplitN(r.RequestURI, "?", 2)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  6. cmd/erasure-server-pool-decom.go

    		FuncName:  fmt.Sprintf("decommission.%s (pool-id=%d)", d.String(), poolIdx),
    		Duration:  duration,
    		Path:      path,
    		Error:     errStr,
    	}
    }
    
    func (m *decomMetrics) log(d decomMetric, poolIdx int, paths ...string) func(err error) {
    	startTime := time.Now()
    	return func(err error) {
    		duration := time.Since(startTime)
    		if globalTrace.NumSubscribers(madmin.TraceDecommission) > 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 41.5K bytes
    - Viewed (1)
  7. internal/logger/logrotate.go

    				Message: msg,
    				Time:    time.Now().UTC(),
    				Trace:   &log.Trace{Message: msg},
    			})
    		}
    	}
    
    	path := filepath.Join(w.opts.Directory, w.opts.FileNameFunc())
    	f, err := newFile(path)
    	if err != nil {
    		return fmt.Errorf("unable to create new file at %v: %w", path, err)
    	}
    
    	w.f = f
    
    	return nil
    }
    
    // NewDir creates a new concurrency safe Writer which performs log rotation.
    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)
  8. cmd/streaming-signature-v4.go

    // than 16 MiB. We must not accept arbitrary large chunks.
    // One 16 MiB is a reasonable max limit.
    //
    // Then we read the signature and payload data. We compute the SHA256 checksum
    // of the payload and verify that it matches the expected signature value.
    //
    // The last chunk is *always* 0-sized. So, we must only return io.EOF if we have encountered
    // a chunk with a chunk size = 0. However, this chunk still has a signature and we must
    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)
  9. cmd/namespace-lock.go

    	start := UTCNow()
    	const readLock = false
    	success := make([]int, len(li.paths))
    	for i, path := range li.paths {
    		if !li.ns.lock(ctx, li.volume, path, lockSource, li.opsID, readLock, timeout.Timeout()) {
    			timeout.LogFailure()
    			for si, sint := range success {
    				if sint == 1 {
    					li.ns.unlock(li.volume, li.paths[si], readLock)
    				}
    			}
    			if errors.Is(ctx.Err(), context.Canceled) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  10. cmd/common-main.go

    	}
    
    	// Disallow relative paths, figure out absolute paths.
    	dirAbs, err := filepath.Abs(dir)
    	if err != nil {
    		return nil, err
    	}
    	err = mkdirAllIgnorePerm(dirAbs)
    	if err != nil {
    		return nil, fmt.Errorf("unable to create the directory `%s`: %w", dirAbs, err)
    	}
    
    	return &ConfigDir{path: dirAbs}, 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)
Back to top