Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for IntVal (0.16 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

    	fuzz "github.com/google/gofuzz"
    )
    
    func TestFromInt(t *testing.T) {
    	i := FromInt(93)
    	if i.Type != Int || i.IntVal != 93 {
    		t.Errorf("Expected IntVal=93, got %+v", i)
    	}
    }
    
    func TestFromInt32(t *testing.T) {
    	i := FromInt32(93)
    	if i.Type != Int || i.IntVal != 93 {
    		t.Errorf("Expected IntVal=93, got %+v", i)
    	}
    }
    
    func TestFromString(t *testing.T) {
    	i := FromString("76")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  2. src/fmt/scan_test.go

    	{"21\n", &intVal, 21},
    	{"2_1\n", &intVal, 21},
    	{"0\n", &intVal, 0},
    	{"000\n", &intVal, 0},
    	{"0x10\n", &intVal, 0x10},
    	{"0x_1_0\n", &intVal, 0x10},
    	{"-0x10\n", &intVal, -0x10},
    	{"0377\n", &intVal, 0377},
    	{"0_3_7_7\n", &intVal, 0377},
    	{"0o377\n", &intVal, 0377},
    	{"0o_3_7_7\n", &intVal, 0377},
    	{"-0377\n", &intVal, -0377},
    	{"-0o377\n", &intVal, -0377},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 20:25:13 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  3. operator/pkg/apis/istio/v1alpha1/value_types_json.go

    	if err != nil {
    		return err
    	}
    	this.IntVal = &wrapperspb.Int32Value{Value: s}
    	return nil
    }
    
    func (this *IntOrString) MarshalJSONPB(_ *github_com_golang_protobuf_jsonpb.Marshaler) ([]byte, error) {
    	return this.MarshalJSON()
    }
    
    func (this *IntOrString) MarshalJSON() ([]byte, error) {
    	if this.IntVal != nil {
    		return json.Marshal(this.IntVal.GetValue())
    	}
    	return json.Marshal(this.StrVal.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)
  4. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    //
    // +protobuf=true
    // +protobuf.options.(gogoproto.goproto_stringer)=false
    // +k8s:openapi-gen=true
    type IntOrString struct {
    	Type   Type   `protobuf:"varint,1,opt,name=type,casttype=Type"`
    	IntVal int32  `protobuf:"varint,2,opt,name=intVal"`
    	StrVal string `protobuf:"bytes,3,opt,name=strVal"`
    }
    
    // Type represents the stored type of IntOrString.
    type Type int64
    
    const (
    	Int    Type = iota // The IntOrString holds an int.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. src/go/constant/value.go

    func (ratVal) implementsValue()     {}
    func (intVal) implementsValue()     {}
    func (floatVal) implementsValue()   {}
    func (complexVal) implementsValue() {}
    
    func newInt() *big.Int     { return new(big.Int) }
    func newRat() *big.Rat     { return new(big.Rat) }
    func newFloat() *big.Float { return new(big.Float).SetPrec(prec) }
    
    func i64toi(x int64Val) intVal   { return intVal{newInt().SetInt64(int64(x))} }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  6. pkg/kube/apimirror/probe.go

    )
    
    type IntOrString struct {
    	Type   Type
    	IntVal int32
    	StrVal string
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    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)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. pkg/probe/util_test.go

    	}{
    		{
    			name: "get port by int type",
    			args: args{
    				param:     intstr.IntOrString{Type: 0, IntVal: 443},
    				container: &v1.Container{},
    			},
    			want:    443,
    			wantErr: false,
    		},
    		{
    			name: "invalid port",
    			args: args{
    				param:     intstr.IntOrString{Type: 0, IntVal: 66666},
    				container: &v1.Container{},
    			},
    			want:    66666,
    			wantErr: true,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 10 06:14:41 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. pilot/cmd/pilot-agent/status/server_test.go

    			HTTPGet: &apimirror.HTTPGetAction{
    				Path: "/hello/sunnyvale",
    				Port: apimirror.IntOrString{IntVal: int32(appPort)},
    			},
    		},
    		"/app-health/hello-world/livez": &Prober{
    			HTTPGet: &apimirror.HTTPGetAction{
    				Port: apimirror.IntOrString{IntVal: int32(appPort)},
    			},
    		},
    	}
    	simpleTCPConfig := KubeAppProbers{
    		"/app-health/hello-world/readyz": &Prober{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 42.6K bytes
    - Viewed (0)
Back to top