Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Int64Value (0.18 sec)

  1. src/log/slog/value_test.go

    		{uint8(3), Uint64Value(3)},
    		{uint16(4), Uint64Value(4)},
    		{uint32(5), Uint64Value(5)},
    		{uint64(6), Uint64Value(6)},
    		{uintptr(7), Uint64Value(7)},
    		{int8(8), Int64Value(8)},
    		{int16(9), Int64Value(9)},
    		{int32(10), Int64Value(10)},
    		{int64(11), Int64Value(11)},
    	} {
    		got := AnyValue(test.in)
    		if !got.Equal(test.want) {
    			t.Errorf("%v (%[1]T): got %v (kind %s), want %v (kind %s)",
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-05-16 16:12
    - 6.9K bytes
    - Viewed (0)
  2. pkg/kubelet/kuberuntime/security_context.go

    		SelinuxOptions: convertToRuntimeSELinuxOption(securityContext.SELinuxOptions),
    	}
    	if securityContext.RunAsUser != nil {
    		sc.RunAsUser = &runtimeapi.Int64Value{Value: int64(*securityContext.RunAsUser)}
    	}
    	if securityContext.RunAsGroup != nil {
    		sc.RunAsGroup = &runtimeapi.Int64Value{Value: int64(*securityContext.RunAsGroup)}
    	}
    	if securityContext.Privileged != nil {
    		sc.Privileged = *securityContext.Privileged
    	}
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-05-29 22:40
    - 5.2K bytes
    - Viewed (0)
  3. pkg/kubelet/kuberuntime/helpers_test.go

    				uid:      (*runtimeapi.Int64Value)(nil),
    				username: "",
    			},
    			imageUserValues{
    				uid:      int64(0),
    				username: "",
    				err:      nil,
    			},
    		},
    		{
    			"image with username and no uid should return ((*int64)nil, imageStatus.Username, nil)",
    			image{
    				name:     "test-image-ref2",
    				uid:      (*runtimeapi.Int64Value)(nil),
    				username: "testUser",
    			},
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-04-24 18:25
    - 11.7K bytes
    - Viewed (0)
  4. src/log/slog/value.go

    	return Value{num: uint64(len(value)), any: stringptr(unsafe.StringData(value))}
    }
    
    // IntValue returns a [Value] for an int.
    func IntValue(v int) Value {
    	return Int64Value(int64(v))
    }
    
    // Int64Value returns a [Value] for an int64.
    func Int64Value(v int64) Value {
    	return Value{num: uint64(v), any: KindInt64}
    }
    
    // Uint64Value returns a [Value] for a uint64.
    func Uint64Value(v uint64) Value {
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-05-16 16:12
    - 13.3K bytes
    - Viewed (0)
  5. pkg/kubelet/kuberuntime/kuberuntime_sandbox_linux_test.go

    		SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{
    			SelinuxOptions: &runtimeapi.SELinuxOption{
    				User: "qux",
    			},
    			RunAsUser:  &runtimeapi.Int64Value{Value: 1000},
    			RunAsGroup: &runtimeapi.Int64Value{Value: 10},
    		},
    	}
    
    	podSandboxConfig, err := m.generatePodSandboxConfig(pod, 1)
    	assert.NoError(t, err)
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-05-29 22:40
    - 8K bytes
    - Viewed (0)
  6. pkg/kubelet/kuberuntime/labels.go

    	return 0, nil
    }
    
    func getInt64PointerFromLabel(labels map[string]string, label string) (*int64, error) {
    	if strValue, found := labels[label]; found {
    		int64Value, err := strconv.ParseInt(strValue, 10, 64)
    		if err != nil {
    			return nil, err
    		}
    		return &int64Value, nil
    	}
    	// If the label is not found, return pointer nil.
    	return nil, nil
    }
    
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-05-22 02:01
    - 10.9K bytes
    - Viewed (0)
  7. src/log/slog/attr.go

    func String(key, value string) Attr {
    	return Attr{key, StringValue(value)}
    }
    
    // Int64 returns an Attr for an int64.
    func Int64(key string, value int64) Attr {
    	return Attr{key, Int64Value(value)}
    }
    
    // Int converts an int to an int64 and returns
    // an Attr with that value.
    func Int(key string, value int) Attr {
    	return Int64(key, int64(value))
    }
    
    // Uint64 returns an Attr for a uint64.
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-03-25 18:23
    - 2.5K bytes
    - Viewed (0)
  8. src/flag/flag.go

    // -- int64 Value
    type int64Value int64
    
    func newInt64Value(val int64, p *int64) *int64Value {
    	*p = val
    	return (*int64Value)(p)
    }
    
    func (i *int64Value) Set(s string) error {
    	v, err := strconv.ParseInt(s, 0, 64)
    	if err != nil {
    		err = numError(err)
    	}
    	*i = int64Value(v)
    	return err
    }
    
    func (i *int64Value) Get() any { return int64(*i) }
    
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-05-07 18:38
    - 39.7K bytes
    - Viewed (0)
  9. src/log/slog/value_access_benchmark_test.go

    // BenchmarkDispatch/As-8                     	 8212087	       145.3 ns/op
    // BenchmarkDispatch/Visit-8                  	 8926146	       135.3 ns/op
    func BenchmarkDispatch(b *testing.B) {
    	vs := []Value{
    		Int64Value(32768),
    		Uint64Value(0xfacecafe),
    		StringValue("anything"),
    		BoolValue(true),
    		Float64Value(1.2345),
    		DurationValue(time.Second),
    		AnyValue(b),
    	}
    	var (
    		ii int64
    		s  string
    		bb bool
    Registered: 2024-06-12 16:32
    - Last Modified: 2023-03-21 20:55
    - 4.3K bytes
    - Viewed (0)
  10. pkg/kubelet/kuberuntime/kuberuntime_sandbox.go

    		sc := pod.Spec.SecurityContext
    		if sc.RunAsUser != nil && runtime.GOOS != "windows" {
    			lc.SecurityContext.RunAsUser = &runtimeapi.Int64Value{Value: int64(*sc.RunAsUser)}
    		}
    		if sc.RunAsGroup != nil && runtime.GOOS != "windows" {
    			lc.SecurityContext.RunAsGroup = &runtimeapi.Int64Value{Value: int64(*sc.RunAsGroup)}
    		}
    		namespaceOptions, err := runtimeutil.NamespacesForPod(pod, m.runtimeHelper, m.runtimeClassManager)
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-05-29 22:40
    - 13.6K bytes
    - Viewed (0)
Back to top