- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for internalCollection (0.24 sec)
-
pkg/kube/krt/join.go
o := buildCollectionOptions(opts...) if o.name == "" { o.name = fmt.Sprintf("Join[%v]", ptr.TypeName[T]()) } synced := make(chan struct{}) c := slices.Map(cs, func(e Collection[T]) internalCollection[T] { return e.(internalCollection[T]) }) go func() { for _, c := range c { if !c.Synced().WaitUntilSynced(o.stop) { return } } close(synced) log.Infof("%v synced", o.name) }()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 3.3K bytes - Viewed (0) -
pkg/kube/krt/index.go
} func (i *Index[I, K]) Dump() { i.mu.RLock() defer i.mu.RUnlock() log.Errorf("> BEGIN DUMP (index %v[%T])", i.c.(internalCollection[I]).name(), ptr.TypeName[K]()) for k, v := range i.objects { log.Errorf("key %v: %v", k, v.UnsortedList()) } log.Errorf("< END DUMP (index %v[%T]", i.c.(internalCollection[I]).name(), ptr.TypeName[K]()) } // NewNamespaceIndex is a small helper to index a collection by namespace
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 14 04:53:45 UTC 2024 - 2.8K bytes - Viewed (0) -
pkg/kube/krt/testing.go
// limitations under the License. package krt // Dump is a *testing* helper to dump the state of a collection, if possible, into logs. func Dump[O any](c Collection[O]) { c.(internalCollection[O]).dump() } type TestingDummyContext struct{} func (t TestingDummyContext) _internalHandler() { } func (t TestingDummyContext) registerDependency(d *dependency, s Syncer, f func(f erasedEventHandler)) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 1.1K bytes - Viewed (0) -
pkg/kube/krt/static.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 2.1K bytes - Viewed (0) -
pkg/kube/krt/core.go
RegisterBatch(f func(o []Event[T], initialSync bool), runExistingState bool) Syncer } // internalCollection is a superset of Collection for internal usage. All collections must implement this type, but // we only expose some functions to external users for simplicity. type internalCollection[T any] interface { Collection[T] // Name is a human facing name for this collection.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 6.9K bytes - Viewed (0) -
pkg/kube/krt/fetch.go
return &res[0] default: panic("FetchOne found for more than 1 item") } } func Fetch[T any](ctx HandlerContext, cc Collection[T], opts ...FetchOption) []T { h := ctx.(registerDependency) c := cc.(internalCollection[T]) d := &dependency{ id: c.uid(), collectionName: c.name(), filter: &filter{}, } for _, o := range opts { o(d) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 2.6K bytes - Viewed (0) -
pkg/kube/krt/internal.go
) // registerHandlerAsBatched is a helper to register the provided handler as a batched handler. This allows collections to // only implement RegisterBatch. func registerHandlerAsBatched[T any](c internalCollection[T], f func(o Event[T])) Syncer { return c.RegisterBatch(func(events []Event[T], initialSync bool) { for _, o := range events { f(o) } }, true) } // castEvent converts an Event[I] to Event[O].
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 5.6K bytes - Viewed (0) -
pkg/kube/krt/informer.go
} // nolint: unused // (not true, its to implement an interface) func (i *informer[I]) augment(a any) any { if i.augmentation != nil { return i.augmentation(a) } return a } var _ internalCollection[controllers.Object] = &informer[controllers.Object]{} func (i *informer[I]) _internalHandler() {} func (i *informer[I]) Synced() Syncer { return channelSyncer{ name: i.collectionName, synced: i.synced,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 10 11:01:46 UTC 2024 - 6.1K bytes - Viewed (0) -
pkg/kube/krt/collection.go
augmentation func(a any) any synced chan struct{} stop <-chan struct{} } var _ internalCollection[any] = &manyCollection[any, any]{} type handlers[O any] struct { mu sync.RWMutex h []func(o []Event[O], initialSync bool) init bool }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 10 23:33:56 UTC 2024 - 19.4K bytes - Viewed (0)