Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NewManyCollection (0.35 sec)

  1. pkg/kube/krt/collection.go

    	}
    	return newManyCollection[I, O](c, hm, o)
    }
    
    // NewManyCollection transforms a Collection[I] to a Collection[O] by applying the provided transformation function.
    // This applies for one-to-many relationships between I and O.
    // For zero-to-one, use NewSingleton. For one-to-one, use NewCollection.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  2. pkg/kube/krt/README.md

    * `func(input I) *O` via `NewCollection`
        * This generates a one-to-one mapping of input to output. An example would be a transformation from a `Pod` type to a generic `Workload` type.
    * `func(input I) []O` via `NewManyCollection`
        * This generates a one-to-many mapping of input to output. An example would be a transformation from a `Service` to a _set_ of `Endpoint` types.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 18 17:21:50 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/ambient/services.go

    			PortNames:     portNames,
    			LabelSelector: model.NewSelector(s.Spec.Selector),
    			Source:        kind.Service,
    			Waypoint:      waypointKey,
    		}
    	}, krt.WithName("ServicesInfo"))
    	ServiceEntriesInfo := krt.NewManyCollection(ServiceEntries, a.serviceEntryServiceBuilder(Waypoints, Namespaces), krt.WithName("ServiceEntriesInfo"))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 05 12:29:55 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. pkg/kube/krt/core.go

    	// called. Typically, usage of Register is done internally in krt via composition of Collections with Transformations
    	// (NewCollection, NewManyCollection, NewSingleton); however, at boundaries of the system (connecting to something not
    	// using krt), registering directly is expected.
    	Register(f func(o Event[T])) Syncer
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  5. pkg/kube/krt/collection_test.go

    	return slices.Join("/", s.Namespace+"/"+s.Service+"/"+s.Pod)
    }
    
    func SimpleEndpointsCollection(pods krt.Collection[SimplePod], services krt.Collection[SimpleService]) krt.Collection[SimpleEndpoint] {
    	return krt.NewManyCollection[SimpleService, SimpleEndpoint](services, func(ctx krt.HandlerContext, svc SimpleService) []SimpleEndpoint {
    		pods := krt.Fetch(ctx, pods, krt.FilterLabel(svc.Selector))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go

    		a.workloadEntryWorkloadBuilder(MeshConfig, AuthorizationPolicies, PeerAuths, Waypoints, WorkloadServices, WorkloadServicesNamespaceIndex, Namespaces),
    		krt.WithName("WorkloadEntryWorkloads"),
    	)
    	ServiceEntryWorkloads := krt.NewManyCollection(
    		ServiceEntries,
    		a.serviceEntryWorkloadBuilder(MeshConfig, AuthorizationPolicies, PeerAuths, Waypoints, Namespaces),
    		krt.WithName("ServiceEntryWorkloads"),
    	)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.9K bytes
    - Viewed (0)
Back to top