Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. schema/utils.go

    		} else if k != "" {
    			settings[k] = k
    		}
    	}
    
    	return settings
    }
    
    func toColumns(val string) (results []string) {
    	if val != "" {
    		for _, v := range strings.Split(val, ",") {
    			results = append(results, strings.TrimSpace(v))
    		}
    	}
    	return
    }
    
    func removeSettingFromTag(tag reflect.StructTag, names ...string) reflect.StructTag {
    	for _, name := range names {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Aug 19 13:35:14 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  10. utils/tests/utils.go

    		}
    		got := rv.FieldByName(name).Interface()
    		expect := ev.FieldByName(name).Interface()
    		t.Run(name, func(t *testing.T) {
    			AssertEqual(t, got, expect)
    		})
    	}
    }
    
    func AssertEqual(t *testing.T, got, expect interface{}) {
    	if !reflect.DeepEqual(got, expect) {
    		isEqual := func() {
    			if curTime, ok := got.(time.Time); ok {
    				format := "2006-01-02T15:04:05Z07:00"
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Mar 10 09:21:56 UTC 2023
    - 3.9K bytes
    - Viewed (0)
Back to top