Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { *commoncluster.Config Client runtimeclient.Client RESTClient *rest.RESTClient Cache cache.Cache }
func LookupMember ¶
func LookupMember(ctx context.Context, memberClusters map[string]Cluster, namespacedName types.NamespacedName, object runtimeclient.Object) (Cluster, bool, error)
LookupMember takes in a list of member clusters and the NamespacedName of the Object, it then searches for the member cluster that triggered the request. returns memberCluster/true/nil in case the Object was found on one of the given member clusters returns memberCluster/true/error in case the Object was found on one of the given member clusters but there was also an error while searching it returns memberCluster/false/nil in case the Object was NOT found on any of the given member clusters returns memberCluster/false/error in case the Object was NOT found on any of the given member clusters and there was an error while trying to read one or more of the memberclusters
CAVEAT: if the object was not found and there is an error reading from more than one member cluster, only the last read error will be returned.