cache

package
v1.2.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package cache implements a cache of all the resources that are relevant to the gateway

Package cache is a generated GoMock package.

Package cache is a generated GoMock package.

Package cache contains the cache for the gateway

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessControlPoliciesTrigger added in v1.2.0

type AccessControlPoliciesTrigger struct{}

AccessControlPoliciesTrigger is responsible for processing AccessControlPolicy objects

func (*AccessControlPoliciesTrigger) Delete added in v1.2.0

func (p *AccessControlPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a AccessControlPolicy from the cache and returns true if the policy was found

func (*AccessControlPoliciesTrigger) Insert added in v1.2.0

func (p *AccessControlPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a AccessControlPolicy to the cache and returns true if the target service is routable

type Cache

type Cache interface {
	Insert(obj interface{}) bool
	Delete(obj interface{}) bool
	BuildConfigs()
}

Cache is the interface for the functionality provided by the cache

type CircuitBreakingPoliciesTrigger added in v1.2.0

type CircuitBreakingPoliciesTrigger struct{}

CircuitBreakingPoliciesTrigger is responsible for processing CircuitBreakingPolicy objects

func (*CircuitBreakingPoliciesTrigger) Delete added in v1.2.0

func (p *CircuitBreakingPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a CircuitBreakingPolicy from the cache and returns true if the policy was found

func (*CircuitBreakingPoliciesTrigger) Insert added in v1.2.0

func (p *CircuitBreakingPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a CircuitBreakingPolicy to the cache and returns true if the target service is routable

type EndpointSlicesTrigger added in v1.2.0

type EndpointSlicesTrigger struct{}

EndpointSlicesTrigger is responsible for processing EndpointSlices

func (*EndpointSlicesTrigger) Delete added in v1.2.0

func (p *EndpointSlicesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes the EndpointSlice object from the cache and returns true if the cache was modified

func (*EndpointSlicesTrigger) Insert added in v1.2.0

func (p *EndpointSlicesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds the EndpointSlice object to the cache and returns true if the cache was modified

type EndpointsTrigger added in v1.2.0

type EndpointsTrigger struct{}

EndpointsTrigger is responsible for processing Endpoints objects

func (*EndpointsTrigger) Delete added in v1.2.0

func (p *EndpointsTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes the Endpoints object from the cache and returns true if the cache was modified

func (*EndpointsTrigger) Insert added in v1.2.0

func (p *EndpointsTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds the Endpoints object to the cache and returns true if the cache was modified

type FaultInjectionPoliciesTrigger added in v1.2.0

type FaultInjectionPoliciesTrigger struct{}

FaultInjectionPoliciesTrigger is responsible for processing FaultInjectionPolicy objects

func (*FaultInjectionPoliciesTrigger) Delete added in v1.2.0

func (p *FaultInjectionPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a FaultInjectionPolicy from the cache and returns true if the policy was found

func (*FaultInjectionPoliciesTrigger) Insert added in v1.2.0

func (p *FaultInjectionPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a FaultInjectionPolicy to the cache and returns true if the target service is routable

type GRPCRoutesTrigger added in v1.2.0

type GRPCRoutesTrigger struct{}

GRPCRoutesTrigger is responsible for processing GRPCRoute objects

func (*GRPCRoutesTrigger) Delete added in v1.2.0

func (p *GRPCRoutesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a GRPCRoute from the cache and returns true if the route was found

func (*GRPCRoutesTrigger) Insert added in v1.2.0

func (p *GRPCRoutesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a GRPCRoute to the cache and returns true if the route is effective

type GatewayCache

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

GatewayCache is a cache of all the resources that are relevant to the gateway

func NewGatewayCache

func NewGatewayCache(informerCollection *informers.InformerCollection, kubeClient kubernetes.Interface, cfg configurator.Configurator) *GatewayCache

NewGatewayCache creates a new gateway cache

func (*GatewayCache) BuildConfigs

func (c *GatewayCache) BuildConfigs()

BuildConfigs builds the configs for all the gateways in the cache

func (*GatewayCache) Delete

func (c *GatewayCache) Delete(obj interface{}) bool

Delete deletes an object from the cache

func (*GatewayCache) Insert

func (c *GatewayCache) Insert(obj interface{}) bool

Insert inserts an object into the cache

type GatewayClassesTrigger added in v1.2.0

type GatewayClassesTrigger struct{}

GatewayClassesTrigger is responsible for processing GatewayClass objects

func (*GatewayClassesTrigger) Delete added in v1.2.0

func (p *GatewayClassesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes the GatewayClass object from the cache and returns true if the cache was modified

func (*GatewayClassesTrigger) Insert added in v1.2.0

func (p *GatewayClassesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds the GatewayClass object to the cache and returns true if the cache was modified

type GatewayTLSPoliciesTrigger added in v1.2.0

type GatewayTLSPoliciesTrigger struct{}

GatewayTLSPoliciesTrigger is responsible for processing GatewayTLSPolicy objects

func (*GatewayTLSPoliciesTrigger) Delete added in v1.2.0

func (p *GatewayTLSPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a GatewayTLSPolicy from the cache and returns true if the policy was found

func (*GatewayTLSPoliciesTrigger) Insert added in v1.2.0

func (p *GatewayTLSPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a GatewayTLSPolicy to the cache and returns true if the target service is routable

type GatewaysTrigger added in v1.2.0

type GatewaysTrigger struct{}

GatewaysTrigger is responsible for processing Gateway objects

func (*GatewaysTrigger) Delete added in v1.2.0

func (p *GatewaysTrigger) Delete(_ interface{}, _ *GatewayCache) bool

Delete removes the Gateway object from the cache and returns true if the cache was modified

func (*GatewaysTrigger) Insert added in v1.2.0

func (p *GatewaysTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds the Gateway object to the cache and returns true if the cache was modified

type HTTPRoutesTrigger added in v1.2.0

type HTTPRoutesTrigger struct{}

HTTPRoutesTrigger is responsible for processing HTTPRoute objects

func (*HTTPRoutesTrigger) Delete added in v1.2.0

func (p *HTTPRoutesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a HTTPRoute from the cache and returns true if the route was found

func (*HTTPRoutesTrigger) Insert added in v1.2.0

func (p *HTTPRoutesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a HTTPRoute to the cache and returns true if the route is effective

type HealthCheckPoliciesTrigger added in v1.2.0

type HealthCheckPoliciesTrigger struct{}

HealthCheckPoliciesTrigger is responsible for processing HealthCheckPolicy objects

func (*HealthCheckPoliciesTrigger) Delete added in v1.2.0

func (p *HealthCheckPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a HealthCheckPolicy from the cache and returns true if the policy was found

func (*HealthCheckPoliciesTrigger) Insert added in v1.2.0

func (p *HealthCheckPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a HealthCheckPolicy to the cache and returns true if the target service is routable

type LoadBalancerPoliciesTrigger added in v1.2.0

type LoadBalancerPoliciesTrigger struct{}

LoadBalancerPoliciesTrigger is responsible for processing LoadBalancerPolicy objects

func (*LoadBalancerPoliciesTrigger) Delete added in v1.2.0

func (p *LoadBalancerPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a LoadBalancerPolicy from the cache and returns true if the policy was found

func (*LoadBalancerPoliciesTrigger) Insert added in v1.2.0

func (p *LoadBalancerPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a LoadBalancerPolicy to the cache and returns true if the target service is routable

type MockCache

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

MockCache is a mock of Cache interface.

func NewMockCache

func NewMockCache(ctrl *gomock.Controller) *MockCache

NewMockCache creates a new mock instance.

func (*MockCache) BuildConfigs

func (m *MockCache) BuildConfigs()

BuildConfigs mocks base method.

func (*MockCache) Delete

func (m *MockCache) Delete(arg0 interface{}) bool

Delete mocks base method.

func (*MockCache) EXPECT

func (m *MockCache) EXPECT() *MockCacheMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCache) Insert

func (m *MockCache) Insert(arg0 interface{}) bool

Insert mocks base method.

type MockCacheMockRecorder

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

MockCacheMockRecorder is the mock recorder for MockCache.

func (*MockCacheMockRecorder) BuildConfigs

func (mr *MockCacheMockRecorder) BuildConfigs() *gomock.Call

BuildConfigs indicates an expected call of BuildConfigs.

func (*MockCacheMockRecorder) Delete

func (mr *MockCacheMockRecorder) Delete(arg0 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockCacheMockRecorder) Insert

func (mr *MockCacheMockRecorder) Insert(arg0 interface{}) *gomock.Call

Insert indicates an expected call of Insert.

type MockTrigger added in v1.2.0

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

MockTrigger is a mock of Trigger interface.

func NewMockTrigger added in v1.2.0

func NewMockTrigger(ctrl *gomock.Controller) *MockTrigger

NewMockTrigger creates a new mock instance.

func (*MockTrigger) Delete added in v1.2.0

func (m *MockTrigger) Delete(arg0 interface{}, arg1 *GatewayCache) bool

Delete mocks base method.

func (*MockTrigger) EXPECT added in v1.2.0

func (m *MockTrigger) EXPECT() *MockTriggerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTrigger) Insert added in v1.2.0

func (m *MockTrigger) Insert(arg0 interface{}, arg1 *GatewayCache) bool

Insert mocks base method.

type MockTriggerMockRecorder added in v1.2.0

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

MockTriggerMockRecorder is the mock recorder for MockTrigger.

func (*MockTriggerMockRecorder) Delete added in v1.2.0

func (mr *MockTriggerMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockTriggerMockRecorder) Insert added in v1.2.0

func (mr *MockTriggerMockRecorder) Insert(arg0, arg1 interface{}) *gomock.Call

Insert indicates an expected call of Insert.

type RateLimitPoliciesTrigger added in v1.2.0

type RateLimitPoliciesTrigger struct{}

RateLimitPoliciesTrigger is responsible for processing RateLimitPolicy objects

func (*RateLimitPoliciesTrigger) Delete added in v1.2.0

func (p *RateLimitPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a RateLimitPolicy from the cache and returns true if the policy was found

func (*RateLimitPoliciesTrigger) Insert added in v1.2.0

func (p *RateLimitPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a RateLimitPolicy to the cache and returns true if the target service is routable

type ResourceType added in v1.2.0

type ResourceType string

ResourceType is the type used to represent the type of resource

const (
	// ServicesResourceType is the type used to represent the services resource
	ServicesResourceType ResourceType = "services"

	// EndpointSlicesResourceType is the type used to represent the endpoint slices resource
	EndpointSlicesResourceType ResourceType = "endpointslices"

	// EndpointsResourceType is the type used to represent the endpoints resource
	EndpointsResourceType ResourceType = "endpoints"

	// ServiceImportsResourceType is the type used to represent the service imports resource
	ServiceImportsResourceType ResourceType = "serviceimports"

	// SecretsResourceType is the type used to represent the secrets resource
	SecretsResourceType ResourceType = "secrets"

	// GatewayClassesResourceType is the type used to represent the gateway classes resource
	GatewayClassesResourceType ResourceType = "gatewayclasses"

	// GatewaysResourceType is the type used to represent the gateways resource
	GatewaysResourceType ResourceType = "gateways"

	// HTTPRoutesResourceType is the type used to represent the HTTP routes resource
	HTTPRoutesResourceType ResourceType = "httproutes"

	// GRPCRoutesResourceType is the type used to represent the gRPC routes resource
	GRPCRoutesResourceType ResourceType = "grpcroutes"

	// TCPRoutesResourceType is the type used to represent the TCP routes resource
	TCPRoutesResourceType ResourceType = "tcproutes"

	// TLSRoutesResourceType is the type used to represent the TLS routes resource
	TLSRoutesResourceType ResourceType = "tlsroutes"

	// UDPRoutesResourceType is the type used to represent the UDP routes resource
	UDPRoutesResourceType ResourceType = "udproutes"

	// RateLimitPoliciesResourceType is the type used to represent the rate limit policies resource
	RateLimitPoliciesResourceType ResourceType = "ratelimits"

	// SessionStickyPoliciesResourceType is the type used to represent the session sticky policies resource
	SessionStickyPoliciesResourceType ResourceType = "sessionstickies"

	// LoadBalancerPoliciesResourceType is the type used to represent the load balancer policies resource
	LoadBalancerPoliciesResourceType ResourceType = "loadbalancers"

	// CircuitBreakingPoliciesResourceType is the type used to represent the circuit breaking policies resource
	CircuitBreakingPoliciesResourceType ResourceType = "circuitbreakings"

	// AccessControlPoliciesResourceType is the type used to represent the access control policies resource
	AccessControlPoliciesResourceType ResourceType = "accesscontrols"

	// HealthCheckPoliciesResourceType is the type used to represent the health check policies resource
	HealthCheckPoliciesResourceType ResourceType = "healthchecks"

	// FaultInjectionPoliciesResourceType is the type used to represent the fault injection policies resource
	FaultInjectionPoliciesResourceType ResourceType = "faultinjections"

	// UpstreamTLSPoliciesResourceType is the type used to represent the upstream tls policies resource
	UpstreamTLSPoliciesResourceType ResourceType = "upstreamtls"

	// RetryPoliciesResourceType is the type used to represent the retry policies resource
	RetryPoliciesResourceType ResourceType = "retries"

	// GatewayTLSPoliciesResourceType is the type used to represent the gateway tls policies resource
	GatewayTLSPoliciesResourceType ResourceType = "gatewaytls"
)

type RetryPoliciesTrigger added in v1.2.0

type RetryPoliciesTrigger struct{}

RetryPoliciesTrigger is responsible for processing TLSRoute objects

func (*RetryPoliciesTrigger) Delete added in v1.2.0

func (p *RetryPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a RetryPolicy from the cache and returns true if the policy was found

func (*RetryPoliciesTrigger) Insert added in v1.2.0

func (p *RetryPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a RetryPolicy to the cache and returns true if the target service is routable

type SecretTrigger added in v1.2.0

type SecretTrigger struct{}

SecretTrigger is a processor for Secret objects

func (*SecretTrigger) Delete added in v1.2.0

func (p *SecretTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a Secret object from the cache and returns true if the cache is changed

func (*SecretTrigger) Insert added in v1.2.0

func (p *SecretTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a Secret object to the cache and returns true if the cache is changed

type ServiceImportsTrigger added in v1.2.0

type ServiceImportsTrigger struct{}

ServiceImportsTrigger is responsible for processing ServiceImport objects

func (*ServiceImportsTrigger) Delete added in v1.2.0

func (p *ServiceImportsTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a ServiceImport from the cache and returns true if the route was found

func (*ServiceImportsTrigger) Insert added in v1.2.0

func (p *ServiceImportsTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a ServiceImport to the cache and returns true if the route is effective

type ServicesTrigger added in v1.2.0

type ServicesTrigger struct{}

ServicesTrigger is responsible for processing Service objects

func (*ServicesTrigger) Delete added in v1.2.0

func (p *ServicesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes the Service object from the cache and returns true if the cache was modified

func (*ServicesTrigger) Insert added in v1.2.0

func (p *ServicesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds the Service object to the cache and returns true if the cache was modified

type SessionStickyPoliciesTrigger added in v1.2.0

type SessionStickyPoliciesTrigger struct{}

SessionStickyPoliciesTrigger is responsible for processing TLSRoute objects

func (*SessionStickyPoliciesTrigger) Delete added in v1.2.0

func (p *SessionStickyPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a SessionStickyPolicy from the cache and returns true if the policy was found

func (*SessionStickyPoliciesTrigger) Insert added in v1.2.0

func (p *SessionStickyPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a SessionStickyPolicy to the cache and returns true if the target service is routable

type TCPRoutesTrigger added in v1.2.0

type TCPRoutesTrigger struct{}

TCPRoutesTrigger is responsible for processing TCPRoute objects

func (*TCPRoutesTrigger) Delete added in v1.2.0

func (p *TCPRoutesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a TCPRoute from the cache and returns true if the route was found

func (*TCPRoutesTrigger) Insert added in v1.2.0

func (p *TCPRoutesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a TCPRoute to the cache and returns true if the route is effective

type TLSRoutesTrigger added in v1.2.0

type TLSRoutesTrigger struct{}

TLSRoutesTrigger is responsible for processing TLSRoute objects

func (*TLSRoutesTrigger) Delete added in v1.2.0

func (p *TLSRoutesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a TLSRoute from the cache and returns true if the route was found

func (*TLSRoutesTrigger) Insert added in v1.2.0

func (p *TLSRoutesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a TLSRoute to the cache and returns true if the route is effective

type Trigger added in v1.2.0

type Trigger interface {
	Insert(obj interface{}, cache *GatewayCache) bool
	Delete(obj interface{}, cache *GatewayCache) bool
}

Trigger is the interface for the functionality provided by the resources

type UDPRoutesTrigger added in v1.2.0

type UDPRoutesTrigger struct{}

UDPRoutesTrigger is responsible for processing UDPRoute objects

func (*UDPRoutesTrigger) Delete added in v1.2.0

func (p *UDPRoutesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a UDPRoute from the cache and returns true if the route was found

func (*UDPRoutesTrigger) Insert added in v1.2.0

func (p *UDPRoutesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a UDPRoute to the cache and returns true if the route is effective

type UpstreamTLSPoliciesTrigger added in v1.2.0

type UpstreamTLSPoliciesTrigger struct{}

UpstreamTLSPoliciesTrigger is responsible for processing TLSRoute objects

func (*UpstreamTLSPoliciesTrigger) Delete added in v1.2.0

func (p *UpstreamTLSPoliciesTrigger) Delete(obj interface{}, cache *GatewayCache) bool

Delete removes a TLSRoute from the cache and returns true if the route was found

func (*UpstreamTLSPoliciesTrigger) Insert added in v1.2.0

func (p *UpstreamTLSPoliciesTrigger) Insert(obj interface{}, cache *GatewayCache) bool

Insert adds a TLSRoute to the cache and returns true if the route is effective

Jump to

Keyboard shortcuts

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