cache

package
v1.2.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 35 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 AccessControlPolicyMatchType

type AccessControlPolicyMatchType string

AccessControlPolicyMatchType is the type used to represent the rate limit policy match type

const (
	// AccessControlPolicyMatchTypePort is the type used to represent the rate limit policy match type port
	AccessControlPolicyMatchTypePort AccessControlPolicyMatchType = "port"

	// AccessControlPolicyMatchTypeHostnames is the type used to represent the rate limit policy match type hostnames
	AccessControlPolicyMatchTypeHostnames AccessControlPolicyMatchType = "hostnames"

	// AccessControlPolicyMatchTypeHTTPRoute is the type used to represent the rate limit policy match type httproute
	AccessControlPolicyMatchTypeHTTPRoute AccessControlPolicyMatchType = "httproute"

	// AccessControlPolicyMatchTypeGRPCRoute is the type used to represent the rate limit policy match type grpcroute
	AccessControlPolicyMatchTypeGRPCRoute AccessControlPolicyMatchType = "grpcroute"
)

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 FaultInjectionPolicyMatchType

type FaultInjectionPolicyMatchType string

FaultInjectionPolicyMatchType is the type used to represent the fault injection policy match type

const (

	// FaultInjectionPolicyMatchTypeHostnames is the type used to represent the fault injection policy match type hostnames
	FaultInjectionPolicyMatchTypeHostnames FaultInjectionPolicyMatchType = "hostnames"

	// FaultInjectionPolicyMatchTypeHTTPRoute is the type used to represent the fault injection policy match type httproute
	FaultInjectionPolicyMatchTypeHTTPRoute FaultInjectionPolicyMatchType = "httproute"

	// FaultInjectionPolicyMatchTypeGRPCRoute is the type used to represent the fault injection policy match type grpcroute
	FaultInjectionPolicyMatchTypeGRPCRoute FaultInjectionPolicyMatchType = "grpcroute"
)

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 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(obj interface{}, cache *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 MockProcessor

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

MockProcessor is a mock of Processor interface.

func NewMockProcessor

func NewMockProcessor(ctrl *gomock.Controller) *MockProcessor

NewMockProcessor creates a new mock instance.

func (*MockProcessor) Delete

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

Delete mocks base method.

func (*MockProcessor) EXPECT

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

func (*MockProcessor) Insert

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

Insert mocks base method.

type MockProcessorMockRecorder

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

MockProcessorMockRecorder is the mock recorder for MockProcessor.

func (*MockProcessorMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockProcessorMockRecorder) Insert

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

Insert indicates an expected call of Insert.

type Processor

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

Processor is the interface for the functionality provided by the processors

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 RateLimitPolicyMatchType

type RateLimitPolicyMatchType string

RateLimitPolicyMatchType is the type used to represent the rate limit policy match type

const (
	// RateLimitPolicyMatchTypePort is the type used to represent the rate limit policy match type port
	RateLimitPolicyMatchTypePort RateLimitPolicyMatchType = "port"

	// RateLimitPolicyMatchTypeHostnames is the type used to represent the rate limit policy match type hostnames
	RateLimitPolicyMatchTypeHostnames RateLimitPolicyMatchType = "hostnames"

	// RateLimitPolicyMatchTypeHTTPRoute is the type used to represent the rate limit policy match type httproute
	RateLimitPolicyMatchTypeHTTPRoute RateLimitPolicyMatchType = "httproute"

	// RateLimitPolicyMatchTypeGRPCRoute is the type used to represent the rate limit policy match type grpcroute
	RateLimitPolicyMatchTypeGRPCRoute RateLimitPolicyMatchType = "grpcroute"
)

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 TLSRoute from the cache and returns true if the route was found

func (*SessionStickyPoliciesTrigger) Insert added in v1.2.0

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

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

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 TriggerType

type TriggerType string

TriggerType is the type used to represent the type of processor

const (
	// ServicesTriggerType is the type used to represent the services processor
	ServicesTriggerType TriggerType = "services"

	// EndpointSlicesTriggerType is the type used to represent the endpoint slices processor
	EndpointSlicesTriggerType TriggerType = "endpointslices"

	// EndpointsTriggerType is the type used to represent the endpoints processor
	EndpointsTriggerType TriggerType = "endpoints"

	// ServiceImportsTriggerType is the type used to represent the service imports processor
	ServiceImportsTriggerType TriggerType = "serviceimports"

	// SecretsTriggerType is the type used to represent the secrets processor
	SecretsTriggerType TriggerType = "secrets"

	// GatewayClassesTriggerType is the type used to represent the gateway classes processor
	GatewayClassesTriggerType TriggerType = "gatewayclasses"

	// GatewaysTriggerType is the type used to represent the gateways processor
	GatewaysTriggerType TriggerType = "gateways"

	// HTTPRoutesTriggerType is the type used to represent the HTTP routes processor
	HTTPRoutesTriggerType TriggerType = "httproutes"

	// GRPCRoutesTriggerType is the type used to represent the gRPC routes processor
	GRPCRoutesTriggerType TriggerType = "grpcroutes"

	// TCPRoutesTriggerType is the type used to represent the TCP routes processor
	TCPRoutesTriggerType TriggerType = "tcproutes"

	// TLSRoutesTriggerType is the type used to represent the TLS routes processor
	TLSRoutesTriggerType TriggerType = "tlsroutes"

	// RateLimitPoliciesTriggerType is the type used to represent the rate limit policies processor
	RateLimitPoliciesTriggerType TriggerType = "ratelimits"

	// SessionStickyPoliciesTriggerType is the type used to represent the session sticky policies processor
	SessionStickyPoliciesTriggerType TriggerType = "sessionstickies"

	// LoadBalancerPoliciesTriggerType is the type used to represent the load balancer policies processor
	LoadBalancerPoliciesTriggerType TriggerType = "loadbalancers"

	// CircuitBreakingPoliciesTriggerType is the type used to represent the circuit breaking policies processor
	CircuitBreakingPoliciesTriggerType TriggerType = "circuitbreakings"

	// AccessControlPoliciesTriggerType is the type used to represent the access control policies processor
	AccessControlPoliciesTriggerType TriggerType = "accesscontrols"

	// HealthCheckPoliciesTriggerType is the type used to represent the health check policies processor
	HealthCheckPoliciesTriggerType TriggerType = "healthchecks"

	// FaultInjectionPoliciesTriggerType is the type used to represent the fault injection policies processor
	FaultInjectionPoliciesTriggerType TriggerType = "faultinjections"

	// UpstreamTLSPoliciesTriggerType is the type used to represent the upstream tls policies processor
	UpstreamTLSPoliciesTriggerType TriggerType = "upstreamtls"
)

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