Documentation ¶
Overview ¶
Package discovery implements the logic of the discovery of other clusters, both on local networks and in wide area networks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateForeignWAN ¶
func UpdateForeignWAN(ctx context.Context, transport *http.Transport, cl client.Client, localCluster v1alpha1.ClusterIdentity, data []*AuthData, sd *v1alpha1.SearchDomain) []*v1alpha1.ForeignCluster
UpdateForeignWAN updates the list of known foreign clusters: for each cluster retrieved with DNS discovery, if it is not the local cluster, check if it is already known, if not create it. In both cases update the ForeignCluster TTL This function also sets an owner reference and a label to the ForeignCluster pointing to the SearchDomain CR.
Types ¶
type AuthData ¶
type AuthData struct {
// contains filtered or unexported fields
}
AuthData contains the information exchanged with the discovery methods on how to contact a remote Authentication Service.
func NewAuthData ¶
NewAuthData creates a new AuthData struct.
func (*AuthData) Get ¶
func (authData *AuthData) Get(discovery *Controller, entry *zeroconf.ServiceEntry) error
Get decodes and populates the AuthData struct given a discovery Controller and a DNS entry.
func (*AuthData) IsComplete ¶
IsComplete checks if both address and port are correctly set.
type Controller ¶
type Controller struct { client.Client LocalCluster discoveryv1alpha1.ClusterIdentity // contains filtered or unexported fields }
Controller is the controller for the discovery functionalities.
func NewDiscoveryCtrl ¶
func NewDiscoveryCtrl(cl, namespacedClient client.Client, namespace string, localCluster discoveryv1alpha1.ClusterIdentity, config MDNSConfig, dialTCPTimeout time.Duration) *Controller
NewDiscoveryCtrl returns a new discovery controller.