Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for typemap (0.11 sec)

  1. pkg/typemap/map_test.go

    	typemap.Set(tm, &TestStruct{Field: "pointer"})
    	typemap.Set[TestInterface[string]](tm, TestStruct{Field: "interface"})
    
    	assert.Equal(t, typemap.Get[int](tm), ptr.Of(1))
    	assert.Equal(t, typemap.Get[int32](tm), ptr.Of(int32(2)))
    	assert.Equal(t, typemap.Get[string](tm), ptr.Of("string"))
    	assert.Equal(t, typemap.Get[*TestStruct](tm), ptr.Of(&TestStruct{Field: "pointer"}))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  2. pkg/typemap/map.go

    // limitations under the License.
    
    package typemap
    
    import (
    	"reflect"
    
    	"istio.io/istio/pkg/ptr"
    )
    
    // TypeMap provides a map that holds a map of Type -> Value. There can be only a single value per type.
    // The value stored for a type must be of the same type as the key.
    type TypeMap struct {
    	inner map[reflect.Type]any
    }
    
    func NewTypeMap() TypeMap {
    	return TypeMap{make(map[reflect.Type]any)}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. pkg/config/schema/kubetypes/common.go

    	"istio.io/istio/pkg/config/schema/gvk"
    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/typemap"
    )
    
    func MustGVRFromType[T runtime.Object]() schema.GroupVersionResource {
    	if gk, ok := getGvk(ptr.Empty[T]()); ok {
    		gr, ok := gvk.ToGVR(gk)
    		if !ok {
    			panic(fmt.Sprintf("unknown GVR for GVK %v", gk))
    		}
    		return gr
    	}
    	if rp := typemap.Get[RegisterType[T]](registeredTypes); rp != nil {
    		return (*rp).GetGVR()
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  4. src/runtime/type.go

    				}
    			}
    			typehash[t.Hash] = append(tlist, t)
    		}
    
    		if md.typemap == nil {
    			// If any of this module's typelinks match a type from a
    			// prior module, prefer that prior type by adding the offset
    			// to this module's typemap.
    			tm := make(map[typeOff]*_type, len(md.typelinks))
    			pinnedTypemaps = append(pinnedTypemaps, tm)
    			md.typemap = tm
    			for _, tl := range md.typelinks {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. pkg/config/schema/kubeclient/common.go

    	"istio.io/istio/pkg/config/schema/kubetypes"
    	"istio.io/istio/pkg/kube/informerfactory"
    	ktypes "istio.io/istio/pkg/kube/kubetypes"
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/typemap"
    )
    
    type ClientGetter interface {
    	// Ext returns the API extensions client.
    	Ext() kubeext.Interface
    
    	// Kube returns the core kube client
    	Kube() kubernetes.Interface
    
    	// Dynamic client.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/schemas_test.go

    			}
    		}
    	}
    }
    
    func TestSchemaDeclTypes(t *testing.T) {
    	ts := testSchema()
    	cust := SchemaDeclType(ts, true).MaybeAssignTypeName("CustomObject")
    	typeMap := apiservercel.FieldTypeMap("CustomObject", cust)
    	nested, _ := cust.FindField("nested")
    	metadata, _ := cust.FindField("metadata")
    	expectedObjTypeMap := map[string]*apiservercel.DeclType{
    		"CustomObject":          cust,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 14K bytes
    - Viewed (0)
  7. src/go/internal/gcimporter/ureader.go

    	case pkgbits.TypeArray:
    		len := int64(r.Uint64())
    		return types.NewArray(r.typ(), len)
    	case pkgbits.TypeChan:
    		dir := types.ChanDir(r.Len())
    		return types.NewChan(dir, r.typ())
    	case pkgbits.TypeMap:
    		return types.NewMap(r.typ(), r.typ())
    	case pkgbits.TypePointer:
    		return types.NewPointer(r.typ())
    	case pkgbits.TypeSignature:
    		return r.signature(nil, nil, nil)
    	case pkgbits.TypeSlice:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/runtime/symtab.go

    	modulehashes []modulehash
    
    	hasmain uint8 // 1 if module contains the main function, 0 otherwise
    	bad     bool  // module failed to load and should be ignored
    
    	gcdatamask, gcbssmask bitvector
    
    	typemap map[typeOff]*_type // offset to *_rtype in previous module
    
    	next *moduledata
    }
    
    // A modulehash is used to compare the ABI of a new module or a
    // package in a new module with the loaded program.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 40K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/macho.go

    		return true
    	}
    	name := ldr.SymName(s)
    	if strings.HasPrefix(name, "go:itab.") {
    		return true
    	}
    	if strings.HasPrefix(name, "type:") && !strings.HasPrefix(name, "type:.") {
    		// reduce runtime typemap pressure, but do not
    		// export alg functions (type:.*), as these
    		// appear in pclntable.
    		return true
    	}
    	if strings.HasPrefix(name, "go:link.pkghash") {
    		return true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  10. pilot/pkg/xds/monitoring.go

    	model.DebugTrigger:    pushTriggers.With(typeTag.Value(string(model.DebugTrigger))),
    	model.SecretTrigger:   pushTriggers.With(typeTag.Value(string(model.SecretTrigger))),
    	model.NetworksTrigger: pushTriggers.With(typeTag.Value(string(model.NetworksTrigger))),
    	model.ProxyRequest:    pushTriggers.With(typeTag.Value(string(model.ProxyRequest))),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 6.7K bytes
    - Viewed (0)
Back to top