Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for leash (0.13 sec)

  1. cmd/etcd.go

    	timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout)
    	defer cancel()
    	lease, err := client.Grant(timeoutCtx, ttl)
    	if err != nil {
    		return etcdErrToErr(err, client.Endpoints())
    	}
    	_, err = client.Put(timeoutCtx, key, string(data), etcd.WithLease(lease.ID))
    	etcdLogIf(ctx, err)
    	return etcdErrToErr(err, client.Endpoints())
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  2. cmd/server-rlimit.go

    		return err
    	}
    
    	if maxLimit < 4096 && runtime.GOOS != globalWindowsOSName {
    		logger.Info("WARNING: maximum file descriptor limit %d is too low for production servers. At least 4096 is recommended. Fix with \"ulimit -n 4096\"",
    			maxLimit)
    	}
    
    	if err = sys.SetMaxOpenFileLimit(maxLimit, maxLimit); err != nil {
    		return err
    	}
    
    	// Set max memory limit as current memory limit.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. internal/bucket/bandwidth/reader.go

    			tokens = need + hdr
    
    		} else { // part of header can be accommodated
    			r.opts.HeaderSize -= b - 1
    			need = 1 // to ensure we read at least one byte for every Read
    			tokens = b
    		}
    	} else { // all tokens go towards payload
    		need = int(math.Min(float64(b), float64(need)))
    		tokens = need
    	}
    
    	err = r.throttle.WaitN(r.ctx, tokens)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  4. docs/debugging/pprofgoparser/main.go

    					t = time.Duration(a) * time.Minute
    					save(line)
    					record = true
    				} else {
    					skip = true
    				}
    			}
    		}
    	}
    
    	return ret, nil
    }
    
    const helpUsage = `
    
    At least one argument is required to run this tool.
    
    EXAMPLE:
         ./pprofgoparser --time 50m --margin 1m /path/to/*-goroutines-before,debug=2.txt
    `
    
    func main() {
    	flag.Parse()
    
    	if len(flag.Args()) == 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  5. cmd/metrics-v3-handler.go

    	var notFoundHandler http.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		http.Error(w, "Metrics Resource Not found", http.StatusNotFound)
    	})
    
    	// Require that metrics path has at least component.
    	if path == "/" {
    		return notFoundHandler
    	}
    
    	if isListingRequest {
    		handler := h.listMetrics(path)
    		if handler == nil {
    			return notFoundHandler
    		}
    		return handler
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 17:37:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  6. internal/handlers/proxy.go

    		scheme = strings.ToLower(proto)
    	} else if proto = r.Header.Get(xForwardedScheme); proto != "" {
    		scheme = strings.ToLower(proto)
    	} else if proto := r.Header.Get(forwarded); proto != "" {
    		// match should contain at least two elements if the protocol was
    		// specified in the Forwarded header. The first element will always be
    		// the 'for=', which we ignore, subsequently we proceed to look for
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 22 00:56:55 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  7. cmd/os_unix.go

    		if osIsExist(err) {
    			return nil
    		}
    		return err
    	}
    
    	return nil
    }
    
    // The buffer must be at least a block long.
    // refer https://github.com/golang/go/issues/24015
    const blockSize = 8 << 10 // 8192
    
    // By default at least 128 entries in single getdents call (1MiB buffer)
    var (
    	direntPool = sync.Pool{
    		New: func() interface{} {
    			buf := make([]byte, blockSize*128)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  8. internal/crypto/sse-kms.go

    )
    
    // String returns the SSE domain as string. For SSE-KMS the
    // domain is "SSE-KMS".
    func (ssekms) String() string { return "SSE-KMS" }
    
    // IsRequested returns true if the HTTP headers contains
    // at least one SSE-KMS header.
    func (ssekms) IsRequested(h http.Header) bool {
    	if _, ok := h[xhttp.AmzServerSideEncryptionKmsID]; ok {
    		return true
    	}
    	if _, ok := h[xhttp.AmzServerSideEncryptionKmsContext]; ok {
    		return true
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  9. internal/lock/lock_windows.go

    //
    // See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
    func fixLongPath(path string) string {
    	// Do nothing (and don't allocate) if the path is "short".
    	// Empirically (at least on the Windows Server 2013 builder),
    	// the kernel is arbitrarily okay with < 248 bytes. That
    	// matches what the docs above say:
    	// "When using an API to create a directory, the specified
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  10. internal/config/etcd/etcd.go

    	}
    	cli, err := clientv3.New(cfg.Config)
    	if err != nil {
    		return nil, err
    	}
    	cli.KV = namespace.NewKV(cli.KV, cfg.PathPrefix)
    	cli.Watcher = namespace.NewWatcher(cli.Watcher, cfg.PathPrefix)
    	cli.Lease = namespace.NewLease(cli.Lease, cfg.PathPrefix)
    	return cli, nil
    }
    
    func parseEndpoints(endpoints string) ([]string, bool, error) {
    	etcdEndpoints := strings.Split(endpoints, config.ValueSeparator)
    
    	var etcdSecure bool
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top