func NewFilteredGCPBackendPolicyInformer()

in pkg/client/informers/externalversions/networking/v1/gcpbackendpolicy.go [58:78]


func NewFilteredGCPBackendPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
	return cache.NewSharedIndexInformer(
		&cache.ListWatch{
			ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
				if tweakListOptions != nil {
					tweakListOptions(&options)
				}
				return client.NetworkingV1().GCPBackendPolicies(namespace).List(context.TODO(), options)
			},
			WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
				if tweakListOptions != nil {
					tweakListOptions(&options)
				}
				return client.NetworkingV1().GCPBackendPolicies(namespace).Watch(context.TODO(), options)
			},
		},
		&networkingv1.GCPBackendPolicy{},
		resyncPeriod,
		indexers,
	)
}