Documentation
¶
Index ¶
- func HandleSubscription[K comparable, V any](subscription <-chan watchable.Snapshot[K, V], handle func(Update[K, V]))
- type InfraIR
- type ProviderResources
- func (p *ProviderResources) GetGatewayClasses() []*gwapiv1b1.GatewayClass
- func (p *ProviderResources) GetGateways() []*gwapiv1b1.Gateway
- func (p *ProviderResources) GetHTTPRoutes() []*gwapiv1b1.HTTPRoute
- func (p *ProviderResources) GetNamespaces() []*corev1.Namespace
- func (p *ProviderResources) GetReferenceGrants() []*gwapiv1a2.ReferenceGrant
- func (p *ProviderResources) GetSecrets() []*corev1.Secret
- func (p *ProviderResources) GetServices() []*corev1.Service
- func (p *ProviderResources) GetTLSRoutes() []*gwapiv1a2.TLSRoute
- type Update
- type Xds
- type XdsIR
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleSubscription ¶
func HandleSubscription[K comparable, V any]( subscription <-chan watchable.Snapshot[K, V], handle func(Update[K, V]), )
HandleSubscription takes a channel returned by watchable.Map.Subscribe() (or .SubscribeSubset()), and calls the given function for each initial value in the map, and for any updates.
This is better than simply iterating over snapshot.Updates because it handles the case where the the watchable.Map already contains entries before .Subscribe is called.
Types ¶
type ProviderResources ¶
type ProviderResources struct { GatewayClasses watchable.Map[string, *gwapiv1b1.GatewayClass] Gateways watchable.Map[types.NamespacedName, *gwapiv1b1.Gateway] HTTPRoutes watchable.Map[types.NamespacedName, *gwapiv1b1.HTTPRoute] TLSRoutes watchable.Map[types.NamespacedName, *gwapiv1a2.TLSRoute] Namespaces watchable.Map[string, *corev1.Namespace] Services watchable.Map[types.NamespacedName, *corev1.Service] Secrets watchable.Map[types.NamespacedName, *corev1.Secret] ReferenceGrants watchable.Map[types.NamespacedName, *gwapiv1a2.ReferenceGrant] GatewayStatuses watchable.Map[types.NamespacedName, *gwapiv1b1.Gateway] HTTPRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1b1.HTTPRoute] TLSRouteStatuses watchable.Map[types.NamespacedName, *gwapiv1a2.TLSRoute] }
ProviderResources message
func (*ProviderResources) GetGatewayClasses ¶
func (p *ProviderResources) GetGatewayClasses() []*gwapiv1b1.GatewayClass
func (*ProviderResources) GetGateways ¶
func (p *ProviderResources) GetGateways() []*gwapiv1b1.Gateway
func (*ProviderResources) GetHTTPRoutes ¶
func (p *ProviderResources) GetHTTPRoutes() []*gwapiv1b1.HTTPRoute
func (*ProviderResources) GetNamespaces ¶
func (p *ProviderResources) GetNamespaces() []*corev1.Namespace
func (*ProviderResources) GetReferenceGrants ¶
func (p *ProviderResources) GetReferenceGrants() []*gwapiv1a2.ReferenceGrant
func (*ProviderResources) GetSecrets ¶
func (p *ProviderResources) GetSecrets() []*corev1.Secret
func (*ProviderResources) GetServices ¶
func (p *ProviderResources) GetServices() []*corev1.Service
func (*ProviderResources) GetTLSRoutes ¶
func (p *ProviderResources) GetTLSRoutes() []*gwapiv1a2.TLSRoute
Click to show internal directories.
Click to hide internal directories.