cache

package
v0.1.1-beta12 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendInfo

type BackendInfo struct {
	ServicePortName ServicePortName
}

type BaseEndpointInfo

type BaseEndpointInfo struct {
	Endpoint string
	Nodename string
	Hostname 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) Headers

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

func (BaseIngressInfo) Host

func (info BaseIngressInfo) Host() string

func (BaseIngressInfo) Path

func (info BaseIngressInfo) Path() string

func (BaseIngressInfo) Rewrite

func (info BaseIngressInfo) Rewrite() []string

func (BaseIngressInfo) String

func (info BaseIngressInfo) String() string

type BaseServiceInfo

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

func (*BaseServiceInfo) Address

func (info *BaseServiceInfo) Address() string

func (*BaseServiceInfo) Export

func (info *BaseServiceInfo) Export() bool

func (*BaseServiceInfo) ExportName

func (info *BaseServiceInfo) ExportName() 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 struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(connectorConfig config.ConnectorConfig, api *kube.K8sAPI, resyncPeriod time.Duration, clusterCfg *config.Store) *Cache

func (*Cache) GetBroadcaster

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

func (*Cache) GetControllers

func (c *Cache) GetControllers() *Controllers

func (*Cache) OnConfigMapAdd

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

func (*Cache) OnConfigMapDelete

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

func (*Cache) OnConfigMapSynced

func (c *Cache) OnConfigMapSynced()

func (*Cache) OnConfigMapUpdate

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

func (*Cache) OnEndpointsAdd

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

func (*Cache) OnEndpointsDelete

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

func (*Cache) OnEndpointsSynced

func (c *Cache) OnEndpointsSynced()

func (*Cache) OnEndpointsUpdate

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

func (*Cache) OnIngressClassv1Add

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

func (*Cache) OnIngressClassv1Delete

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

func (*Cache) OnIngressClassv1Synced

func (c *Cache) OnIngressClassv1Synced()

func (*Cache) OnIngressClassv1Update

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

func (*Cache) OnIngressv1Add

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

func (*Cache) OnIngressv1Delete

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

func (*Cache) OnIngressv1Synced

func (c *Cache) OnIngressv1Synced()

func (*Cache) OnIngressv1Update

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

func (*Cache) OnServiceAdd

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

func (*Cache) OnServiceDelete

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

func (*Cache) OnServiceSynced

func (c *Cache) OnServiceSynced()

func (*Cache) OnServiceUpdate

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

func (*Cache) Sync

func (c *Cache) Sync()

func (*Cache) SyncLoop

func (c *Cache) SyncLoop()

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 Controllers

type Controllers struct {
	Service        *controller.ServiceController
	Endpoints      *controller.EndpointsController
	Ingressv1      *controller.Ingressv1Controller
	IngressClassv1 *controller.IngressClassv1Controller
	//ConfigMap      *ConfigMapController
	GatewayApi *GatewayApiControllers
}

type Endpoint

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

type EndpointChangeTracker

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

func NewEndpointChangeTracker

func NewEndpointChangeTracker(
	enrichEndpointInfo enrichEndpointFunc,
	recorder events.EventRecorder,
) *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 {
	V1alpha2 *GatewayApiV1alpha2Controllers
}

type IngressChangeTracker

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

func NewIngressChangeTracker

func NewIngressChangeTracker(k8sAPI *kube.K8sAPI, controllers *Controllers, recorder events.EventRecorder, enrichIngressInfo enrichIngressInfoFunc) *IngressChangeTracker

func (*IngressChangeTracker) Update

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

type IngressMap

type IngressMap map[ServicePortName]Route

func (IngressMap) Update

func (im IngressMap) Update(changes *IngressChangeTracker)

type Route

type Route interface {
	String() string
	Headers() map[string]string
	Host() string
	Path() string
	Backend() ServicePortName
	Rewrite() []string
}

Route , Ingress Route interface

type ServiceChangeTracker

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

func NewServiceChangeTracker

func NewServiceChangeTracker(
	enrichServiceInfo enrichServiceInfoFunc,
	recorder events.EventRecorder,
) *ServiceChangeTracker

func (*ServiceChangeTracker) Update

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

type ServiceEndpoint

type ServiceEndpoint struct {
	Endpoint        string
	ServicePortName ServicePortName
}

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
	Export() bool
	ExportName() string
}

type ServicePortName

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

func (ServicePortName) String

func (spn ServicePortName) String() string

Jump to

Keyboard shortcuts

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