- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 248 for intVar (0.3 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go
func (intstr *IntOrString) UnmarshalJSON(value []byte) error { if value[0] == '"' { intstr.Type = String return json.Unmarshal(value, &intstr.StrVal) } intstr.Type = Int return json.Unmarshal(value, &intstr.IntVal) } func (intstr *IntOrString) UnmarshalCBOR(value []byte) error { if err := cbor.Unmarshal(value, &intstr.StrVal); err == nil { intstr.Type = String return nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 7.8K bytes - Viewed (0) -
src/cmd/go/internal/work/build.go
// install, list, run, and test commands. func AddBuildFlags(cmd *base.Command, mask BuildFlagMask) { base.AddBuildFlagsNX(&cmd.Flag) base.AddChdirFlag(&cmd.Flag) cmd.Flag.BoolVar(&cfg.BuildA, "a", false, "") cmd.Flag.IntVar(&cfg.BuildP, "p", cfg.BuildP, "") if mask&OmitVFlag == 0 { cmd.Flag.BoolVar(&cfg.BuildV, "v", false, "") } cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "") cmd.Flag.Var(buildCompiler{}, "compiler", "")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 21 17:22:59 UTC 2024 - 33.2K bytes - Viewed (0) -
operator/pkg/apis/istio/v1alpha1/value_types_json.go
if this.IntVal != nil { return json.Marshal(this.IntVal.GetValue()) } return json.Marshal(this.StrVal.GetValue()) } func (this *IntOrString) UnmarshalJSONPB(_ *github_com_golang_protobuf_jsonpb.Unmarshaler, value []byte) error { return this.UnmarshalJSON(value) } func (this *IntOrString) ToKubernetes() intstr.IntOrString { if this.IntVal != nil { return intstr.FromInt32(this.GetIntVal().GetValue()) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 2.2K bytes - Viewed (0) -
pkg/kube/apimirror/probe.go
func (intstr IntOrString) MarshalJSON() ([]byte, error) { switch intstr.Type { case Int: return json.Marshal(intstr.IntVal) case String: return json.Marshal(intstr.StrVal) default: return []byte{}, fmt.Errorf("impossible IntOrString.Type") } } func (intstr *IntOrString) IntValue() int { if intstr.Type == String { i, _ := strconv.Atoi(intstr.StrVal) return i } return int(intstr.IntVal)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 23 15:07:03 UTC 2024 - 4.4K bytes - Viewed (0) -
pkg/apis/networking/v1beta1/conversion.go
return err } if len(in.ServiceName) > 0 || in.ServicePort.IntVal != 0 || in.ServicePort.StrVal != "" || in.ServicePort.Type == intstr.String { out.Service = &networking.IngressServiceBackend{} out.Service.Name = in.ServiceName out.Service.Port.Name = in.ServicePort.StrVal out.Service.Port.Number = in.ServicePort.IntVal } return nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 07:16:15 UTC 2023 - 2.8K bytes - Viewed (0) -
pkg/probe/util_test.go
func TestResolveContainerPort(t *testing.T) { t.Parallel() type args struct { param intstr.IntOrString container *v1.Container } tests := []struct { name string args args want int wantErr bool }{ { name: "get port by int type", args: args{ param: intstr.IntOrString{Type: 0, IntVal: 443}, container: &v1.Container{}, }, want: 443, wantErr: false,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 10 06:14:41 UTC 2023 - 3.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go
if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType) } m.IntVal = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.IntVal |= int32(b&0x7F) << shift if b < 0x80 { break } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:37 UTC 2024 - 9.5K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/util.go
// TODO(@hzxuzhonghu): check protocol as well as port if p.Name == servicePort.Name || p.Port == int32(servicePort.Port) { if p.TargetPort.Type == intstr.Int && p.TargetPort.IntVal > 0 { return serviceTargetPort{num: int(p.TargetPort.IntVal), name: p.Name, explicitName: false} } return serviceTargetPort{num: 0, name: p.TargetPort.StrVal, explicitName: true} } } // should never happen
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jul 28 02:01:47 UTC 2023 - 6.1K bytes - Viewed (0) -
cmd/kubeadm/app/phases/addons/dns/dns_test.go
Port: 53, Protocol: v1.ProtocolUDP, TargetPort: intstr.IntOrString{ Type: 0, IntVal: 53, }, }, { Name: "dns-tcp", Port: 53, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{ Type: 0, IntVal: 53, }, }, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 11 10:21:20 UTC 2024 - 41.7K bytes - Viewed (0) -
common-protos/k8s.io/apimachinery/pkg/util/intstr/generated.proto
*/ // This file was autogenerated by go-to-protobuf. Do not edit it manually! syntax = "proto2"; package k8s.io.apimachinery.pkg.util.intstr; // Package-wide variables from generator "generated". option go_package = "k8s.io/apimachinery/pkg/util/intstr"; // IntOrString is a type that can hold an int32 or a string. When used in // JSON or YAML marshalling and unmarshalling, it produces or consumes the
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 1.3K bytes - Viewed (0)