Documentation ¶
Overview ¶
Package cache contains cache logic for pipy ingress controller
Index ¶
- type Cache
- type Endpoint
- type EndpointChangeTracker
- type EndpointsMap
- type IngressChangeTracker
- type IngressMap
- type MultiClusterEndpointsMap
- type Route
- type RouteKey
- type ServiceChangeTracker
- type ServiceEndpoint
- type ServiceImportChangeTracker
- type ServiceImportMap
- type ServiceMap
- type ServicePort
- type ServicePortName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is the type used to represent the cache for the ingress controller
func NewCache ¶
func NewCache(ctx *cctx.ControllerContext) *Cache
NewCache creates a new cache for the ingress controller
type Endpoint ¶
type Endpoint interface { String() string IP() string Port() (int, error) NodeName() string HostName() string ClusterInfo() string Equal(Endpoint) bool }
Endpoint , Endpoint interface
type EndpointChangeTracker ¶
type EndpointChangeTracker struct {
// contains filtered or unexported fields
}
EndpointChangeTracker tracks changes in endpoints
func NewEndpointChangeTracker ¶
func NewEndpointChangeTracker(enrichEndpointInfo enrichEndpointFunc, recorder events.EventRecorder) *EndpointChangeTracker
NewEndpointChangeTracker creates a new EndpointChangeTracker
type EndpointsMap ¶
type EndpointsMap map[ServicePortName][]Endpoint
EndpointsMap is a map of service port name to endpoints
func (EndpointsMap) Update ¶
func (em EndpointsMap) Update(changes *EndpointChangeTracker)
Update updates the endpoints map with the changes
type IngressChangeTracker ¶
type IngressChangeTracker struct {
// contains filtered or unexported fields
}
IngressChangeTracker tracks changes to Ingresses
func NewIngressChangeTracker ¶
func NewIngressChangeTracker(client cache.Cache, recorder events.EventRecorder) *IngressChangeTracker
NewIngressChangeTracker creates a new IngressChangeTracker
func (*IngressChangeTracker) Update ¶
func (t *IngressChangeTracker) Update(previous, current *networkingv1.Ingress) bool
Update updates the tracker with the given Ingresses
type IngressMap ¶
IngressMap is a map of Ingresses
func (IngressMap) Update ¶
func (im IngressMap) Update(changes *IngressChangeTracker)
Update updates the ingress map with the changes
type MultiClusterEndpointsMap ¶
type MultiClusterEndpointsMap map[ServicePortName][]Endpoint
MultiClusterEndpointsMap is a map of ServicePortName to Endpoint from multiple clusters
func (MultiClusterEndpointsMap) Update ¶
func (em MultiClusterEndpointsMap) Update(changes *ServiceImportChangeTracker)
Update updates the MultiClusterEndpointsMap with the changes from the ServiceImportChangeTracker
type Route ¶
type Route interface { String() string Headers() map[string]string Host() string Path() string Backend() ServicePortName Rewrite() []string SessionSticky() bool LBType() commons.AlgoBalancer UpstreamSSLName() string UpstreamSSLCert() *route.CertificateSpec UpstreamSSLVerify() bool Certificate() *route.CertificateSpec IsTLS() bool IsWildcardHost() bool VerifyClient() bool VerifyDepth() int TrustedCA() *route.CertificateSpec Protocol() string }
Route , Ingress Route interface
type RouteKey ¶
type RouteKey struct { ServicePortName Host string Path string }
RouteKey is a key for IngressMap
type ServiceChangeTracker ¶
type ServiceChangeTracker struct {
// contains filtered or unexported fields
}
ServiceChangeTracker tracks changes to services
func NewServiceChangeTracker ¶
func NewServiceChangeTracker(enrichServiceInfo enrichServiceInfoFunc, recorder events.EventRecorder, client cache.Cache) *ServiceChangeTracker
NewServiceChangeTracker creates a new ServiceChangeTracker
type ServiceEndpoint ¶
type ServiceEndpoint struct { Endpoint string ServicePortName ServicePortName }
ServiceEndpoint , Service Endpoints interface
type ServiceImportChangeTracker ¶
type ServiceImportChangeTracker struct {
// contains filtered or unexported fields
}
ServiceImportChangeTracker tracks changes to ServiceImport objects
func NewServiceImportChangeTracker ¶
func NewServiceImportChangeTracker(enrichServiceImportInfo enrichServiceImportInfoFunc, enrichEndpointInfo enrichMultiClusterEndpointFunc, recorder events.EventRecorder, client cache.Cache) *ServiceImportChangeTracker
NewServiceImportChangeTracker creates a new ServiceImportChangeTracker
func (*ServiceImportChangeTracker) Update ¶
func (t *ServiceImportChangeTracker) Update(previous, current *mcsv1alpha1.ServiceImport) bool
Update updates the ServiceImportChangeTracker with the latest ServiceImport
type ServiceImportMap ¶
type ServiceImportMap map[ServicePortName]ServicePort
ServiceImportMap is a map of ServicePortName to ServicePort
func (*ServiceImportMap) Update ¶
func (sm *ServiceImportMap) Update(changes *ServiceImportChangeTracker)
Update updates the ServiceImportMap with the latest ServiceImport changes
type ServiceMap ¶
type ServiceMap map[ServicePortName]ServicePort
ServiceMap is a map of ServicePortName to ServicePort
func (*ServiceMap) Update ¶
func (sm *ServiceMap) Update(changes *ServiceChangeTracker)
Update updates the service map with the given service changes
type ServicePort ¶
ServicePort , Service Port interface
type ServicePortName ¶
type ServicePortName struct { types.NamespacedName Port string Protocol v1.Protocol }
ServicePortName , Service Port Name
func (ServicePortName) String ¶
func (spn ServicePortName) String() string