discovery

package
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

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

This section is empty.

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

func NewAuthData(address string, port int, ttl uint32) *AuthData

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

func (authData *AuthData) IsComplete() bool

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.

func (*Controller) Start

func (discovery *Controller) Start(ctx context.Context) error

Start starts the discovery logic.

type MDNSConfig

type MDNSConfig struct {
	EnableAdvertisement bool
	EnableDiscovery     bool

	Service string
	Domain  string
	TTL     time.Duration

	ResolveRefreshTime time.Duration
}

MDNSConfig defines the configuration parameters for the mDNS service.

Directories

Path Synopsis
Package utils contains functions useful for the discovery component, in particular during the communications with a remote cluster.
Package utils contains functions useful for the discovery component, in particular during the communications with a remote cluster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL