cache

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEndpointInfo

type BaseEndpointInfo struct {
	Endpoint string
	Nodename string
	Hostname string
	Cluster  string
}

func (*BaseEndpointInfo) ClusterInfo

func (info *BaseEndpointInfo) ClusterInfo() string

func (*BaseEndpointInfo) Equal

func (info *BaseEndpointInfo) Equal(other Endpoint) bool

func (*BaseEndpointInfo) HostName

func (info *BaseEndpointInfo) HostName() string

func (*BaseEndpointInfo) IP

func (info *BaseEndpointInfo) IP() string

func (*BaseEndpointInfo) NodeName

func (info *BaseEndpointInfo) NodeName() string

func (*BaseEndpointInfo) Port

func (info *BaseEndpointInfo) Port() (int, error)

func (*BaseEndpointInfo) String

func (info *BaseEndpointInfo) String() string

type BaseIngressInfo

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

func (BaseIngressInfo) Backend

func (info BaseIngressInfo) Backend() ServicePortName

func (BaseIngressInfo) Certificate

func (info BaseIngressInfo) Certificate() *route.CertificateSpec

func (BaseIngressInfo) Headers

func (info BaseIngressInfo) Headers() map[string]string

func (BaseIngressInfo) Host

func (info BaseIngressInfo) Host() string

func (BaseIngressInfo) IsTLS

func (info BaseIngressInfo) IsTLS() bool

func (BaseIngressInfo) IsWildcardHost

func (info BaseIngressInfo) IsWildcardHost() bool

func (BaseIngressInfo) LBType

func (info BaseIngressInfo) LBType() route.AlgoBalancer

func (BaseIngressInfo) Path

func (info BaseIngressInfo) Path() string

func (BaseIngressInfo) Rewrite

func (info BaseIngressInfo) Rewrite() []string

func (BaseIngressInfo) SessionSticky

func (info BaseIngressInfo) SessionSticky() bool

func (BaseIngressInfo) String

func (info BaseIngressInfo) String() string

func (BaseIngressInfo) TrustedCA

func (info BaseIngressInfo) TrustedCA() *route.CertificateSpec

func (BaseIngressInfo) UpstreamSSLCert

func (info BaseIngressInfo) UpstreamSSLCert() *route.CertificateSpec

func (BaseIngressInfo) UpstreamSSLName

func (info BaseIngressInfo) UpstreamSSLName() string

func (BaseIngressInfo) UpstreamSSLVerify

func (info BaseIngressInfo) UpstreamSSLVerify() bool

func (BaseIngressInfo) VerifyClient

func (info BaseIngressInfo) VerifyClient() bool

func (BaseIngressInfo) VerifyDepth

func (info BaseIngressInfo) VerifyDepth() int

type BaseServiceImportInfo

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

func (*BaseServiceImportInfo) Address

func (info *BaseServiceImportInfo) Address() string

func (*BaseServiceImportInfo) Port

func (info *BaseServiceImportInfo) Port() int

func (*BaseServiceImportInfo) Protocol

func (info *BaseServiceImportInfo) Protocol() corev1.Protocol

func (*BaseServiceImportInfo) String

func (info *BaseServiceImportInfo) String() string

type BaseServiceInfo

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

func (*BaseServiceInfo) Address

func (info *BaseServiceInfo) Address() string

func (*BaseServiceInfo) Port

func (info *BaseServiceInfo) Port() int

func (*BaseServiceInfo) Protocol

func (info *BaseServiceInfo) Protocol() corev1.Protocol

func (*BaseServiceInfo) String

func (info *BaseServiceInfo) String() string

type Cache

type Cache interface {
	Sync()
	SyncLoop(stopCh <-chan struct{})
	GetBroadcaster() events.EventBroadcaster
	GetControllers() controller.Controllers
	GetRecorder() events.EventRecorder
}

func NewCache

func NewCache(ctx context.Context, api *kube.K8sAPI, clusterCfg *config.Store, broker *event.Broker, certMgr certificate.Manager, resyncPeriod time.Duration) Cache

type Endpoint

type Endpoint interface {
	String() string
	IP() string
	Port() (int, error)
	NodeName() string
	HostName() string
	ClusterInfo() string
	Equal(Endpoint) bool
}

type EndpointChangeTracker

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

func NewEndpointChangeTracker

func NewEndpointChangeTracker(enrichEndpointInfo enrichEndpointFunc, recorder events.EventRecorder, controllers *controller.LocalControllers) *EndpointChangeTracker

func (*EndpointChangeTracker) Update

func (ect *EndpointChangeTracker) Update(previous, current *corev1.Endpoints) bool

type EndpointsMap

type EndpointsMap map[ServicePortName][]Endpoint

func (EndpointsMap) Update

func (em EndpointsMap) Update(changes *EndpointChangeTracker)

type GatewayApiControllers

type GatewayApiControllers struct {
	V1beta1 *GatewayApiV1beta1Controllers
}

type IngressChangeTracker

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

func NewIngressChangeTracker

func NewIngressChangeTracker(k8sAPI *kube.K8sAPI, controllers *controller.LocalControllers, recorder events.EventRecorder, mgr certificate.Manager) *IngressChangeTracker

func (*IngressChangeTracker) Update

func (ict *IngressChangeTracker) Update(previous, current *networkingv1.Ingress) bool

type IngressMap

type IngressMap map[RouteKey]Route

func (IngressMap) Update

func (im IngressMap) Update(changes *IngressChangeTracker)

type LocalCache

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

func (*LocalCache) GetBroadcaster

func (c *LocalCache) GetBroadcaster() events.EventBroadcaster

func (*LocalCache) GetControllers

func (c *LocalCache) GetControllers() controller.Controllers

func (*LocalCache) GetRecorder

func (c *LocalCache) GetRecorder() events.EventRecorder

func (*LocalCache) OnConfigMapAdd

func (c *LocalCache) OnConfigMapAdd(cm *corev1.ConfigMap)

func (*LocalCache) OnConfigMapDelete

func (c *LocalCache) OnConfigMapDelete(cm *corev1.ConfigMap)

func (*LocalCache) OnConfigMapSynced

func (c *LocalCache) OnConfigMapSynced()

func (*LocalCache) OnConfigMapUpdate

func (c *LocalCache) OnConfigMapUpdate(oldCm, cm *corev1.ConfigMap)

func (*LocalCache) OnEndpointsAdd

func (c *LocalCache) OnEndpointsAdd(endpoints *corev1.Endpoints)

func (*LocalCache) OnEndpointsDelete

func (c *LocalCache) OnEndpointsDelete(endpoints *corev1.Endpoints)

func (*LocalCache) OnEndpointsSynced

func (c *LocalCache) OnEndpointsSynced()

func (*LocalCache) OnEndpointsUpdate

func (c *LocalCache) OnEndpointsUpdate(oldEndpoints, endpoins *corev1.Endpoints)

func (*LocalCache) OnIngressClassv1Add

func (c *LocalCache) OnIngressClassv1Add(class *networkingv1.IngressClass)

func (*LocalCache) OnIngressClassv1Delete

func (c *LocalCache) OnIngressClassv1Delete(class *networkingv1.IngressClass)

func (*LocalCache) OnIngressClassv1Synced

func (c *LocalCache) OnIngressClassv1Synced()

func (*LocalCache) OnIngressClassv1Update

func (c *LocalCache) OnIngressClassv1Update(oldClass, class *networkingv1.IngressClass)

func (*LocalCache) OnIngressv1Add

func (c *LocalCache) OnIngressv1Add(ingress *networkingv1.Ingress)

func (*LocalCache) OnIngressv1Delete

func (c *LocalCache) OnIngressv1Delete(ingress *networkingv1.Ingress)

func (*LocalCache) OnIngressv1Synced

func (c *LocalCache) OnIngressv1Synced()

func (*LocalCache) OnIngressv1Update

func (c *LocalCache) OnIngressv1Update(oldIngress, ingress *networkingv1.Ingress)

func (*LocalCache) OnServiceAdd

func (c *LocalCache) OnServiceAdd(service *corev1.Service)

func (*LocalCache) OnServiceDelete

func (c *LocalCache) OnServiceDelete(service *corev1.Service)

func (*LocalCache) OnServiceImportAdd

func (c *LocalCache) OnServiceImportAdd(serviceImport *v1alpha1.ServiceImport)

func (*LocalCache) OnServiceImportDelete

func (c *LocalCache) OnServiceImportDelete(serviceImport *v1alpha1.ServiceImport)

func (*LocalCache) OnServiceImportSynced

func (c *LocalCache) OnServiceImportSynced()

func (*LocalCache) OnServiceImportUpdate

func (c *LocalCache) OnServiceImportUpdate(oldServiceImport, serviceImport *v1alpha1.ServiceImport)

func (*LocalCache) OnServiceSynced

func (c *LocalCache) OnServiceSynced()

func (*LocalCache) OnServiceUpdate

func (c *LocalCache) OnServiceUpdate(oldService, service *corev1.Service)

func (*LocalCache) Sync

func (c *LocalCache) Sync()

func (*LocalCache) SyncLoop

func (c *LocalCache) SyncLoop(stopCh <-chan struct{})

SyncLoop runs periodic work. This is expected to run as a goroutine or as the main loop of the app. It does not return.

type MultiClusterEndpointsMap

type MultiClusterEndpointsMap map[ServicePortName][]Endpoint

func (MultiClusterEndpointsMap) Update

type RemoteCache

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

func (*RemoteCache) GetBroadcaster

func (c *RemoteCache) GetBroadcaster() events.EventBroadcaster

func (*RemoteCache) GetControllers

func (c *RemoteCache) GetControllers() controller.Controllers

func (*RemoteCache) GetRecorder

func (c *RemoteCache) GetRecorder() events.EventRecorder

func (*RemoteCache) OnServiceExportAdd

func (c *RemoteCache) OnServiceExportAdd(export *svcexpv1alpha1.ServiceExport)

func (*RemoteCache) OnServiceExportDelete

func (c *RemoteCache) OnServiceExportDelete(export *svcexpv1alpha1.ServiceExport)

func (*RemoteCache) OnServiceExportSynced

func (c *RemoteCache) OnServiceExportSynced()

func (*RemoteCache) OnServiceExportUpdate

func (c *RemoteCache) OnServiceExportUpdate(oldExport, export *svcexpv1alpha1.ServiceExport)

func (*RemoteCache) OnUpdate

func (c *RemoteCache) OnUpdate(oldExport, export *svcexpv1alpha1.ServiceExport)

func (*RemoteCache) Sync

func (c *RemoteCache) Sync()

func (*RemoteCache) SyncLoop

func (c *RemoteCache) SyncLoop(stopCh <-chan struct{})

type Route

type Route interface {
	String() string
	Headers() map[string]string
	Host() string
	Path() string
	Backend() ServicePortName
	Rewrite() []string
	SessionSticky() bool
	LBType() route.AlgoBalancer
	UpstreamSSLName() string
	UpstreamSSLCert() *route.CertificateSpec
	UpstreamSSLVerify() bool
	Certificate() *route.CertificateSpec
	IsTLS() bool
	IsWildcardHost() bool
	VerifyClient() bool
	VerifyDepth() int
	TrustedCA() *route.CertificateSpec
}

Route , Ingress Route interface

type RouteKey added in v0.1.3

type RouteKey struct {
	ServicePortName
	Host string
	Path string
}

func (*RouteKey) String added in v0.1.3

func (irk *RouteKey) String() string

type ServiceChangeTracker

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

func NewServiceChangeTracker

func NewServiceChangeTracker(enrichServiceInfo enrichServiceInfoFunc, recorder events.EventRecorder, controllers *controller.LocalControllers, api *kube.K8sAPI) *ServiceChangeTracker

func (*ServiceChangeTracker) Update

func (sct *ServiceChangeTracker) Update(previous, current *corev1.Service) bool

type ServiceEndpoint

type ServiceEndpoint struct {
	Endpoint        string
	ServicePortName ServicePortName
}

type ServiceImportChangeTracker

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

func NewServiceImportChangeTracker

func NewServiceImportChangeTracker(enrichServiceImportInfo enrichServiceImportInfoFunc, enrichEndpointInfo enrichMultiClusterEndpointFunc, recorder events.EventRecorder, controllers *controller.LocalControllers) *ServiceImportChangeTracker

func (*ServiceImportChangeTracker) Update

func (sct *ServiceImportChangeTracker) Update(previous, current *svcimpv1alpha1.ServiceImport) bool

type ServiceImportMap

type ServiceImportMap map[ServicePortName]ServicePort

func (*ServiceImportMap) Update

func (sm *ServiceImportMap) Update(changes *ServiceImportChangeTracker)

type ServiceMap

type ServiceMap map[ServicePortName]ServicePort

func (*ServiceMap) Update

func (sm *ServiceMap) Update(changes *ServiceChangeTracker)

type ServicePort

type ServicePort interface {
	String() string
	Address() string
	Port() int
	Protocol() v1.Protocol
}

type ServicePortName

type ServicePortName struct {
	types.NamespacedName
	Port     string
	Protocol v1.Protocol
}

func (ServicePortName) String

func (spn ServicePortName) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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