Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for collectionUID (0.35 sec)

  1. pkg/kube/krt/internal.go

    	}
    	return reflect.DeepEqual(a, b)
    }
    
    type collectionUID uint64
    
    var globalUIDCounter = atomic.NewUint64(1)
    
    func nextUID() collectionUID {
    	return collectionUID(globalUIDCounter.Inc())
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. pkg/kube/krt/static.go

    package krt
    
    import (
    	"istio.io/istio/pkg/kube/controllers"
    	"istio.io/istio/pkg/maps"
    	"istio.io/istio/pkg/slices"
    )
    
    type staticList[T any] struct {
    	vals map[Key[T]]T
    	id   collectionUID
    }
    
    func NewStaticCollection[T any](vals []T) Collection[T] {
    	res := map[Key[T]]T{}
    	for _, v := range vals {
    		res[GetKey(v)] = v
    	}
    	return &staticList[T]{
    		vals: res,
    		id:   nextUID(),
    	}
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  3. pkg/kube/krt/join.go

    package krt
    
    import (
    	"fmt"
    
    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/slices"
    	"istio.io/istio/pkg/util/sets"
    )
    
    type join[T any] struct {
    	collectionName string
    	id             collectionUID
    	collections    []internalCollection[T]
    	synced         <-chan struct{}
    }
    
    func (j *join[T]) GetKey(k Key[T]) *T {
    	for _, c := range j.collections {
    		if r := c.GetKey(k); r != nil {
    			return r
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. pkg/kube/krt/collection.go

    type manyCollection[I, O any] struct {
    	// collectionName provides the collectionName for this collection.
    	collectionName string
    	id             collectionUID
    	// parent is the input collection we are building off of.
    	parent Collection[I]
    
    	// log is a logger for the collection, with additional labels already added to identify it.
    	log *istiolog.Scope
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  5. pkg/kube/krt/singleton.go

    	return collectionAdapter[T]{x}
    }
    
    // static represents a Collection of a single static value. This can be explicitly Set() to override it
    type static[T any] struct {
    	val           *atomic.Pointer[T]
    	id            collectionUID
    	eventHandlers *handlers[T]
    }
    
    func (d *static[T]) GetKey(k Key[T]) *T {
    	return d.val.Load()
    }
    
    func (d *static[T]) List() []T {
    	v := d.val.Load()
    	if v == nil {
    		return nil
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. pkg/kube/krt/informer.go

    	"istio.io/istio/pkg/ptr"
    )
    
    type informer[I controllers.ComparableObject] struct {
    	inf            kclient.Informer[I]
    	log            *istiolog.Scope
    	collectionName string
    	id             collectionUID
    
    	eventHandlers *handlers[I]
    	augmentation  func(a any) any
    	synced        chan struct{}
    }
    
    // nolint: unused // (not true, its to implement an interface)
    func (i *informer[I]) augment(a any) any {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 10 11:01:46 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. pkg/kube/krt/core.go

    	Collection[T]
    
    	// Name is a human facing name for this collection.
    	// Note this may not be universally unique
    	name() string
    	// Uid is an internal unique ID for this collection. MUST be globally unique
    	uid() collectionUID
    
    	dump()
    
    	// Augment mutates an object for use in various function calls. See WithObjectAugmentation
    	augment(any) any
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top