BuildMultiClusterKclientComponent builds a simple Component that just wraps a single kclient.Client
(c ComponentBuilder, filter kubetypes.Filter)
| 200 | |
| 201 | // BuildMultiClusterKclientComponent builds a simple Component that just wraps a single kclient.Client |
| 202 | func BuildMultiClusterKclientComponent[T controllers.ComparableObject](c ComponentBuilder, filter kubetypes.Filter) *KclientComponent[T] { |
| 203 | res := BuildMultiClusterComponent[kclientInternalComponent[T]](c, func(cluster *Cluster) kclientInternalComponent[T] { |
| 204 | return kclientInternalComponent[T]{kclient.NewFiltered[T](cluster.Client, filter)} |
| 205 | }) |
| 206 | return &KclientComponent[T]{res} |
| 207 | } |
| 208 | |
| 209 | // ForCluster returns the client for the requests cluster |
| 210 | // Note: this may return nil. |
searching dependent graphs…