Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for func (0.03 sec)

  1. cmd/kubeadm/app/preflight/utils.go

    	"strings"
    
    	"github.com/pkg/errors"
    
    	"k8s.io/apimachinery/pkg/util/version"
    	utilsexec "k8s.io/utils/exec"
    )
    
    // GetKubeletVersion is helper function that returns version of kubelet available in $PATH
    func GetKubeletVersion(execer utilsexec.Interface) (*version.Version, error) {
    	kubeletVersionRegex := regexp.MustCompile(`^\s*Kubernetes v((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)([-\w.+]*)?)\s*$`)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 07 07:51:36 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  2. utils/utils.go

    	"fmt"
    	"path/filepath"
    	"reflect"
    	"runtime"
    	"strconv"
    	"strings"
    	"unicode"
    )
    
    var gormSourceDir string
    
    func init() {
    	_, file, _, _ := runtime.Caller(0)
    	// compatible solution to get gorm source directory with various operating systems
    	gormSourceDir = sourceDir(file)
    }
    
    func sourceDir(file string) string {
    	dir := filepath.Dir(file)
    	dir = filepath.Dir(dir)
    
    	s := filepath.Dir(dir)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 22 06:43:02 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. pkg/controller/endpointslicemirroring/utils.go

    type addrTypePortMapKey string
    
    // newAddrTypePortMapKey generates a PortMapKey from endpoint ports.
    func newAddrTypePortMapKey(endpointPorts []discovery.EndpointPort, addrType discovery.AddressType) addrTypePortMapKey {
    	pmk := fmt.Sprintf("%s-%s", addrType, endpointsliceutil.NewPortMapKey(endpointPorts))
    	return addrTypePortMapKey(pmk)
    }
    
    func (pk addrTypePortMapKey) addressType() discovery.AddressType {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 18:08:12 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  4. pkg/proxy/util/utils.go

    	IPv6ZeroCIDR = "::/0"
    )
    
    // isValidEndpoint checks that the given host / port pair are valid endpoint
    func isValidEndpoint(host string, port int) bool {
    	return host != "" && port > 0
    }
    
    // IsZeroCIDR checks whether the input CIDR string is either
    // the IPv4 or IPv6 zero CIDR
    func IsZeroCIDR(cidr string) bool {
    	if cidr == IPv4ZeroCIDR || cidr == IPv6ZeroCIDR {
    		return true
    	}
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  5. pkg/controller/nodeipam/ipam/test/utils.go

    	"k8s.io/kubernetes/pkg/controller/testutil"
    	netutils "k8s.io/utils/net"
    )
    
    const NodePollInterval = 10 * time.Millisecond
    
    var AlwaysReady = func() bool { return true }
    
    // MustParseCIDR returns the CIDR range parsed from s or panics if the string
    // cannot be parsed.
    func MustParseCIDR(s string) *net.IPNet {
    	_, ret, err := netutils.ParseCIDRSloppy(s)
    	if err != nil {
    		panic(err)
    	}
    	return ret
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 06 00:10:39 UTC 2022
    - 2K bytes
    - Viewed (0)
  6. internal/dsync/utils.go

    package dsync
    
    import (
    	"math/rand"
    	"time"
    )
    
    func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration {
    	if unit > time.Hour {
    		// Protect against integer overflow
    		panic("unit cannot exceed one hour")
    	}
    	return func(r *rand.Rand, attempt uint) time.Duration {
    		sleep := min
    		sleep += unit * time.Duration(attempt)
    		if sleep > cap {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat May 13 15:42:21 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/apis/bootstraptoken/v1/utils.go

    	// len(result) == 3
    	validatedSubstringsSize = 3
    )
    
    // MarshalJSON implements the json.Marshaler interface.
    func (bts BootstrapTokenString) MarshalJSON() ([]byte, error) {
    	return []byte(fmt.Sprintf(`"%s"`, bts.String())), nil
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (bts *BootstrapTokenString) UnmarshalJSON(b []byte) error {
    	// If the token is represented as "", just return quickly without an error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 26 15:51:39 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/componentconfigs/utils.go

    	CurrentVersion schema.GroupVersion
    
    	// Document points to the YAML/JSON document that caused the problem
    	Document []byte
    }
    
    // Error implements the standard Golang error interface for UnsupportedConfigVersionError
    func (err *UnsupportedConfigVersionError) Error() string {
    	return fmt.Sprintf("unsupported apiVersion %q, you may have to do manual conversion to %q and run kubeadm again", err.OldVersion, err.CurrentVersion)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 18 08:48:29 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  9. pilot/pkg/security/authn/utils/utils.go

    	"ECDHE-ECDSA-AES128-GCM-SHA256",
    	"ECDHE-RSA-AES128-GCM-SHA256",
    	"AES256-GCM-SHA384",
    	"AES128-GCM-SHA256",
    }
    
    // BuildInboundTLS returns the TLS context corresponding to the mTLS mode.
    func BuildInboundTLS(mTLSMode model.MutualTLSMode, node *model.Proxy,
    	protocol networking.ListenerProtocol, trustDomainAliases []string, minTLSVersion tls.TlsParameters_TlsProtocol,
    	mc *meshconfig.MeshConfig,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 23 00:16:21 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tests/fuzz/utils/utils.go

    )
    
    type NopTester struct{}
    
    func (n NopTester) Fail() {}
    
    func (n NopTester) FailNow() {}
    
    func (n NopTester) Fatal(args ...any) {}
    
    func (n NopTester) Fatalf(format string, args ...any) {}
    
    func (n NopTester) Log(args ...any) {}
    
    func (n NopTester) Logf(format string, args ...any) {}
    
    func (n NopTester) Skip(args ...any) {}
    
    func (n NopTester) TempDir() string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 30 15:31:14 UTC 2022
    - 1.1K bytes
    - Viewed (0)
Back to top