Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 62 for HasPrefix (0.15 sec)

  1. istioctl/pkg/completion/completion.go

    	if err != nil {
    		return nil, err
    	}
    
    	var podsName []string
    	for _, pod := range podList.Items {
    		if toComplete == "" || strings.HasPrefix(pod.Name, toComplete) {
    			podsName = append(podsName, pod.Name)
    		}
    	}
    
    	return podsName, nil
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  2. cmd/metrics-realtime.go

    			Host: globalLocalNodeName,
    		}, false)
    		if _, ok := opts.hosts[server.Endpoint]; ok {
    			byHostName = server.Endpoint
    		} else {
    			return
    		}
    	}
    
    	if strings.HasPrefix(byHostName, ":") && !strings.HasPrefix(globalLocalNodeName, ":") {
    		byHostName = globalLocalNodeName
    	}
    
    	if types.Contains(madmin.MetricsDisk) {
    		m.ByDisk = make(map[string]madmin.DiskMetric)
    		aggr := madmin.DiskMetric{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 10 16:28:08 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  3. cmd/admin-server-info.go

    		config.EnvRootUser:          {},
    		config.EnvRootPassword:      {},
    		config.EnvMinIOSubnetAPIKey: {},
    		kms.EnvKMSSecretKey:         {},
    	}
    	for _, v := range os.Environ() {
    		if !strings.HasPrefix(v, "MINIO") && !strings.HasPrefix(v, "_MINIO") {
    			continue
    		}
    		split := strings.SplitN(v, "=", 2)
    		key := split[0]
    		value := ""
    		if len(split) > 1 {
    			value = split[1]
    		}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  4. cmd/net.go

    	if hostAddr == "" {
    		return "", "", errors.New("unable to process empty address")
    	}
    
    	// Simplify the work of url.Parse() and always send a url with
    	if !strings.HasPrefix(hostAddr, "http://") && !strings.HasPrefix(hostAddr, "https://") {
    		hostAddr = "//" + hostAddr
    	}
    
    	// Parse address to extract host and scheme field
    	u, err := url.Parse(hostAddr)
    	if err != nil {
    		return "", "", err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. cmd/metacache-entries.go

    func (e metaCacheEntry) isObjectDir() bool {
    	return len(e.metadata) > 0 && strings.HasSuffix(e.name, slashSeparator)
    }
    
    // hasPrefix returns whether an entry has a specific prefix
    func (e metaCacheEntry) hasPrefix(s string) bool {
    	return strings.HasPrefix(e.name, s)
    }
    
    // matches returns if the entries have the same versions.
    // If strict is false we allow signatures to mismatch.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  6. istioctl/pkg/util/ambient/util.go

    	"istio.io/api/label"
    	"istio.io/istio/pkg/config/constants"
    	"istio.io/istio/pkg/kube"
    )
    
    func IsZtunnelPod(client kube.CLIClient, podName, podNamespace string) bool {
    	isZtunnel := strings.HasPrefix(podName, "ztunnel")
    	if client == nil {
    		return isZtunnel
    	}
    	pod, err := client.Kube().CoreV1().Pods(podNamespace).Get(context.Background(), podName, metav1.GetOptions{})
    	if err != nil {
    		return isZtunnel
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. cmd/object-api-utils.go

    	}
    	// Success.
    	return etag
    }
    
    // HasPrefix - Prefix matcher string matches prefix in a platform specific way.
    // For example on windows since its case insensitive we are supposed
    // to do case insensitive checks.
    func HasPrefix(s string, prefix string) bool {
    	if runtime.GOOS == globalWindowsOSName {
    		return stringsHasPrefixFold(s, prefix)
    	}
    	return strings.HasPrefix(s, prefix)
    }
    
    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)
  8. cmd/handler-utils.go

    	switch {
    	case strings.HasPrefix(r.URL.Path, peerRESTPrefix):
    		writeErrorResponseString(r.Context(), w, APIError{
    			Code:           "XMinioPeerVersionMismatch",
    			Description:    desc,
    			HTTPStatusCode: http.StatusUpgradeRequired,
    		}, r.URL)
    	case strings.HasPrefix(r.URL.Path, storageRESTPrefix):
    		writeErrorResponseString(r.Context(), w, APIError{
    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)
  9. cmd/auth-handler.go

    	"github.com/minio/pkg/v2/policy"
    )
    
    // Verify if request has JWT.
    func isRequestJWT(r *http.Request) bool {
    	return strings.HasPrefix(r.Header.Get(xhttp.Authorization), jwtAlgorithm)
    }
    
    // Verify if request has AWS Signature Version '4'.
    func isRequestSignatureV4(r *http.Request) bool {
    	return strings.HasPrefix(r.Header.Get(xhttp.Authorization), signV4Algorithm)
    }
    
    // Verify if request has AWS Signature Version '2'.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  10. utils/utils.go

    	len := runtime.Callers(3, pcs[:])
    	frames := runtime.CallersFrames(pcs[:len])
    	for i := 0; i < len; i++ {
    		// second return value is "more", not "ok"
    		frame, _ := frames.Next()
    		if (!strings.HasPrefix(frame.File, gormSourceDir) ||
    			strings.HasSuffix(frame.File, "_test.go")) && !strings.HasSuffix(frame.File, ".gen.go") {
    			return string(strconv.AppendInt(append([]byte(frame.File), ':'), int64(frame.Line), 10))
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top