registry

package
Version: v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncKubeProxyServiceMapper added in v0.10.0

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

AsyncKubeProxyServiceMapper maps an Envoy instance to services in a Kubernetes cluster. It maintains a cache of the mapping updated in response to Kubernetes events.

func NewAsyncKubeProxyServiceMapper added in v0.10.0

func NewAsyncKubeProxyServiceMapper(controller k8s.Controller) *AsyncKubeProxyServiceMapper

NewAsyncKubeProxyServiceMapper initializes a KubeProxyServiceMapper with an empty cache.

func (*AsyncKubeProxyServiceMapper) ListProxyServices added in v0.10.0

func (k *AsyncKubeProxyServiceMapper) ListProxyServices(p *envoy.Proxy) ([]service.MeshService, error)

ListProxyServices maps an Envoy instance to a number of Kubernetes services.

func (*AsyncKubeProxyServiceMapper) Run added in v0.10.0

func (k *AsyncKubeProxyServiceMapper) Run(stop <-chan struct{})

Run starts updating the proxy-to-services cache based on k8s notifications.

type ExplicitProxyServiceMapper

type ExplicitProxyServiceMapper func(*envoy.Proxy) ([]service.MeshService, error)

ExplicitProxyServiceMapper is a custom ProxyServiceMapper implementation.

func (ExplicitProxyServiceMapper) ListProxyServices

func (e ExplicitProxyServiceMapper) ListProxyServices(p *envoy.Proxy) ([]service.MeshService, error)

ListProxyServices executes the given mapping.

type KubeProxyServiceMapper

type KubeProxyServiceMapper struct {
	KubeController k8s.Controller
}

KubeProxyServiceMapper maps an Envoy instance to services in a Kubernetes cluster.

func (*KubeProxyServiceMapper) ListProxyServices

func (k *KubeProxyServiceMapper) ListProxyServices(p *envoy.Proxy) ([]service.MeshService, error)

ListProxyServices maps an Envoy instance to a number of Kubernetes services.

type ProxyRegistry

type ProxyRegistry struct {
	ProxyServiceMapper
	// contains filtered or unexported fields
}

ProxyRegistry keeps track of Envoy proxies as they connect and disconnect from the control plane.

func NewProxyRegistry

func NewProxyRegistry(mapper ProxyServiceMapper) *ProxyRegistry

NewProxyRegistry initializes a new empty *ProxyRegistry.

func (*ProxyRegistry) GetConnectedProxyCount

func (pr *ProxyRegistry) GetConnectedProxyCount() int

GetConnectedProxyCount counts the number of connected proxies

func (*ProxyRegistry) ListConnectedProxies

func (pr *ProxyRegistry) ListConnectedProxies() map[certificate.CommonName]*envoy.Proxy

ListConnectedProxies lists the Envoy proxies already connected and the time they first connected.

func (*ProxyRegistry) ListDisconnectedProxies

func (pr *ProxyRegistry) ListDisconnectedProxies() map[certificate.CommonName]time.Time

ListDisconnectedProxies lists the Envoy proxies disconnected and the time last seen.

func (*ProxyRegistry) RegisterProxy

func (pr *ProxyRegistry) RegisterProxy(proxy *envoy.Proxy)

RegisterProxy implements MeshCatalog and registers a newly connected proxy.

func (*ProxyRegistry) ReleaseCertificateHandler

func (pr *ProxyRegistry) ReleaseCertificateHandler(certManager certificate.Manager) chan struct{}

ReleaseCertificateHandler releases certificates based on podDelete events returns a stop channel which can be used to stop the inner handler

func (*ProxyRegistry) UnregisterProxy

func (pr *ProxyRegistry) UnregisterProxy(p *envoy.Proxy)

UnregisterProxy unregisters the given proxy from the catalog.

type ProxyServiceMapper

type ProxyServiceMapper interface {
	ListProxyServices(*envoy.Proxy) ([]service.MeshService, error)
}

ProxyServiceMapper knows how to map Envoy instances to services.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL