discovery

package
v1.17.0-beta27 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 17 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEdsSyncer added in v0.13.0

func NewEdsSyncer(disc *EndpointDiscovery, discOpts Opts, refreshRate time.Duration) v1.EdsSyncer

Types

type DiscoveryPlugin

type DiscoveryPlugin interface {
	plugins.Plugin

	// UDS API
	// send us an updated list of upstreams on every change
	// namespace is for writing to, not necessarily reading from
	DiscoverUpstreams(watchNamespaces []string, writeNamespace string, opts clients.WatchOpts, discOpts Opts) (chan v1.UpstreamList, chan error, error)
	// finalize any changes to the desired upstream before it gets written
	// for example, copying the functions from the old upstream to the new.
	// a value of false indicates that the resource does not need to be updated
	UpdateUpstream(original, desired *v1.Upstream) (bool, error)

	// EDS API
	// start the EDS watch which sends a new list of endpoints on any change
	// will send only endpoints for upstreams configured with TrackUpstreams
	WatchEndpoints(writeNamespace string, upstreamsToTrack v1.UpstreamList, opts clients.WatchOpts) (<-chan v1.EndpointList, <-chan error, error)
}

type EndpointDiscovery

type EndpointDiscovery struct {
	// contains filtered or unexported fields
}

func NewEndpointDiscovery

func NewEndpointDiscovery(
	watchNamespaces []string,
	writeNamespace string,
	endpointsClient v1.EndpointClient,
	statusSetter resources.StatusSetter,
	discoveryPlugins []DiscoveryPlugin) *EndpointDiscovery

func (*EndpointDiscovery) Ready added in v0.19.0

func (d *EndpointDiscovery) Ready() <-chan struct{}

func (*EndpointDiscovery) StartEds

func (d *EndpointDiscovery) StartEds(upstreamsToTrack v1.UpstreamList, opts clients.WatchOpts) (chan error, error)

launch a goroutine for all the UDS plugins with a single cancel to close them all

type Opts

type Opts struct {
	KubeOpts struct {
		IgnoredServices []string
	}
}

type UpstreamDiscovery

type UpstreamDiscovery struct {
	// contains filtered or unexported fields
}

func NewUpstreamDiscovery

func NewUpstreamDiscovery(
	watchNamespaces []string,
	writeNamespace string,
	upstreamClient v1.UpstreamClient,
	statusSetter resources.StatusSetter,
	discoveryPlugins []DiscoveryPlugin) *UpstreamDiscovery

func (*UpstreamDiscovery) Resync added in v0.13.6

func (d *UpstreamDiscovery) Resync(ctx context.Context) error

ensures that the latest desired upstreams are in sync

func (*UpstreamDiscovery) StartUds

func (d *UpstreamDiscovery) StartUds(opts clients.WatchOpts, discOpts Opts) (chan error, error)

launch a goroutine for all the UDS plugins

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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