Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteAPILevelRateLimitPolicies(resolveRatelimitPolicyList []dpv1alpha1.ResolveRateLimitAPIPolicy)
- func DeleteCustomRateLimitPolicies(customRateLimitPolicy dpv1alpha1.CustomRateLimitPolicyDef)
- func DeleteResourceLevelRateLimitPolicies(resolveRatelimitPolicyList []dpv1alpha1.ResolveRateLimitAPIPolicy)
- func DeleteSubscriptionRateLimitPolicies(resolveSubscriptionRatelimit dpv1alpha3.ResolveSubscriptionRatelimitPolicy)
- func GenerateIdentifierForAPIWithUUID(vhost, uuid string) string
- func GetEnforcerApplicationCache() wso2_cache.SnapshotCache
- func GetEnforcerApplicationKeyMappingCache() wso2_cache.SnapshotCache
- func GetEnforcerApplicationMappingCache() wso2_cache.SnapshotCache
- func GetEnforcerCache() wso2_cache.SnapshotCache
- func GetEnforcerSubscriptionCache() wso2_cache.SnapshotCache
- func GetRateLimiterCache() envoy_cachev3.SnapshotCache
- func GetXdsCache() envoy_cachev3.SnapshotCache
- func SetEmptySnapshotupdate(lable string) bool
- func UpdateRateLimitXDSCache(resolveRatelimitPolicyList []dpv1alpha1.ResolveRateLimitAPIPolicy)
- func UpdateRateLimitXDSCacheForAIRatelimitPolicies(...)
- func UpdateRateLimitXDSCacheForCustomPolicies(customRateLimitPolicies dpv1alpha1.CustomRateLimitPolicyDef)
- func UpdateRateLimitXDSCacheForSubscriptionBasedAIRatelimitPolicies(...)
- func UpdateRateLimitXDSCacheForSubscriptionPolicies(resolveSubscriptionRatelimit dpv1alpha3.ResolveSubscriptionRatelimitPolicy)
- func UpdateRateLimiterPolicies(label string)
- type Callbacks
- func (cb *Callbacks) OnDeltaStreamClosed(id int64, node *core.Node)
- func (cb *Callbacks) OnDeltaStreamOpen(_ context.Context, id int64, typ string) error
- func (cb *Callbacks) OnFetchRequest(_ context.Context, req *discovery.DiscoveryRequest) error
- func (cb *Callbacks) OnFetchResponse(req *discovery.DiscoveryRequest, res *discovery.DiscoveryResponse)
- func (cb *Callbacks) OnStreamClosed(id int64, node *core.Node)
- func (cb *Callbacks) OnStreamDeltaRequest(id int64, req *discovery.DeltaDiscoveryRequest) error
- func (cb *Callbacks) OnStreamDeltaResponse(id int64, req *discovery.DeltaDiscoveryRequest, ...)
- func (cb *Callbacks) OnStreamOpen(_ context.Context, id int64, typ string) error
- func (cb *Callbacks) OnStreamRequest(id int64, request *discovery.DiscoveryRequest) error
- func (cb *Callbacks) OnStreamResponse(context context.Context, id int64, request *discovery.DiscoveryRequest, ...)
- func (cb *Callbacks) Report()
- type EnforcerInternalAPI
- type EnvoyGatewayConfig
- type EnvoyInternalAPI
- type IDHash
Constants ¶
const ( DescriptorKeyForOrg = "org" OrgMetadataKey = "customorg" DescriptorKeyForEnvironment = "environment" DescriptorKeyForPath = "path" DescriptorKeyForMethod = "method" DescriptorValueForAPIMethod = "ALL" DescriptorValueForOperationMethod = ":method" MetadataNamespaceForCustomPolicies = "apk.ratelimit.metadata" MetadataNamespaceForWSO2Policies = "envoy.filters.http.ext_authz" DescriptorKeyForAIRequestTokenCount = "airequesttokencount" DescriptorKeyForAIResponseTokenCount = "airesponsetokencount" DescriptorKeyForAITotalTokenCount = "aitotaltokencount" DescriptorKeyForAIRequestCount = "airequestcount" DescriptorKeyForSubscriptionBasedAIRequestTokenCount = "airequesttokencountsubs" DescriptorKeyForSubscriptionBasedAIResponseTokenCount = "airesponsetokencountsubs" DescriptorKeyForSubscriptionBasedAITotalTokenCount = "aitotaltokencountsubs" DescriptorKeyForSubscriptionBasedAIRequestCount = "airequestcountsubs" DescriptorKeyForSubscription = "subscription" )
Constants relevant to the route related ratelimit configurations
const ( RateLimiterDomain = "Default" RateLimitPolicyOperationLevel string = "OPERATION" RateLimitPolicyAPILevel string = "API" )
Constants relevant to the rate limit service
Variables ¶
var ( // KeyManagerList to store data KeyManagerList = make([]eventhubTypes.KeyManager, 0) )
Functions ¶
func DeleteAPILevelRateLimitPolicies ¶
func DeleteAPILevelRateLimitPolicies(resolveRatelimitPolicyList []dpv1alpha1.ResolveRateLimitAPIPolicy)
DeleteAPILevelRateLimitPolicies delete the ratelimit xds cache
func DeleteCustomRateLimitPolicies ¶
func DeleteCustomRateLimitPolicies(customRateLimitPolicy dpv1alpha1.CustomRateLimitPolicyDef)
DeleteCustomRateLimitPolicies delete the ratelimit xds cache
func DeleteResourceLevelRateLimitPolicies ¶
func DeleteResourceLevelRateLimitPolicies(resolveRatelimitPolicyList []dpv1alpha1.ResolveRateLimitAPIPolicy)
DeleteResourceLevelRateLimitPolicies delete the ratelimit xds cache
func DeleteSubscriptionRateLimitPolicies ¶
func DeleteSubscriptionRateLimitPolicies(resolveSubscriptionRatelimit dpv1alpha3.ResolveSubscriptionRatelimitPolicy)
DeleteSubscriptionRateLimitPolicies delete the ratelimit xds cache
func GenerateIdentifierForAPIWithUUID ¶
GenerateIdentifierForAPIWithUUID generates an identifier unique to the API
func GetEnforcerApplicationCache ¶
func GetEnforcerApplicationCache() wso2_cache.SnapshotCache
GetEnforcerApplicationCache returns xds server cache.
func GetEnforcerApplicationKeyMappingCache ¶
func GetEnforcerApplicationKeyMappingCache() wso2_cache.SnapshotCache
GetEnforcerApplicationKeyMappingCache returns xds server cache.
func GetEnforcerApplicationMappingCache ¶
func GetEnforcerApplicationMappingCache() wso2_cache.SnapshotCache
GetEnforcerApplicationMappingCache returns xds server cache.
func GetEnforcerCache ¶
func GetEnforcerCache() wso2_cache.SnapshotCache
GetEnforcerCache returns xds server cache.
func GetEnforcerSubscriptionCache ¶
func GetEnforcerSubscriptionCache() wso2_cache.SnapshotCache
GetEnforcerSubscriptionCache returns xds server cache.
func GetRateLimiterCache ¶
func GetRateLimiterCache() envoy_cachev3.SnapshotCache
GetRateLimiterCache returns xds server cache for rate limiter service.
func GetXdsCache ¶
func GetXdsCache() envoy_cachev3.SnapshotCache
GetXdsCache returns xds server cache.
func SetEmptySnapshotupdate ¶
SetEmptySnapshotupdate update empty snapshot
func UpdateRateLimitXDSCache ¶
func UpdateRateLimitXDSCache(resolveRatelimitPolicyList []dpv1alpha1.ResolveRateLimitAPIPolicy)
UpdateRateLimitXDSCache updates the xDS cache of the RateLimiter.
func UpdateRateLimitXDSCacheForAIRatelimitPolicies ¶
func UpdateRateLimitXDSCacheForAIRatelimitPolicies(aiRatelimitPolicySpecs map[apimachiner_types.NamespacedName]*dpv1alpha3.AIRateLimitPolicySpec)
UpdateRateLimitXDSCacheForAIRatelimitPolicies updates the xDS cache of the RateLimiter for AI ratelimit policies.
func UpdateRateLimitXDSCacheForCustomPolicies ¶
func UpdateRateLimitXDSCacheForCustomPolicies(customRateLimitPolicies dpv1alpha1.CustomRateLimitPolicyDef)
UpdateRateLimitXDSCacheForCustomPolicies updates the xDS cache of the RateLimiter for custom policies.
func UpdateRateLimitXDSCacheForSubscriptionBasedAIRatelimitPolicies ¶
func UpdateRateLimitXDSCacheForSubscriptionBasedAIRatelimitPolicies(aiRatelimitPolicySpecs map[apimachiner_types.NamespacedName]*dpv1alpha3.AIRateLimitPolicySpec)
UpdateRateLimitXDSCacheForSubscriptionBasedAIRatelimitPolicies updates the xDS cache of the RateLimiter for AI ratelimit policies.
func UpdateRateLimitXDSCacheForSubscriptionPolicies ¶
func UpdateRateLimitXDSCacheForSubscriptionPolicies(resolveSubscriptionRatelimit dpv1alpha3.ResolveSubscriptionRatelimitPolicy)
UpdateRateLimitXDSCacheForSubscriptionPolicies updates the xDS cache of the RateLimiter for subscription policies.
func UpdateRateLimiterPolicies ¶
func UpdateRateLimiterPolicies(label string)
UpdateRateLimiterPolicies update the rate limiter xDS cache with latest rate limit policies
Types ¶
type Callbacks ¶
type Callbacks struct { }
Callbacks is used to debug the xds server related communication.
func (*Callbacks) OnDeltaStreamClosed ¶
OnDeltaStreamClosed is unused.
func (*Callbacks) OnDeltaStreamOpen ¶
OnDeltaStreamOpen is unused.
func (*Callbacks) OnFetchRequest ¶
OnFetchRequest prints debug logs
func (*Callbacks) OnFetchResponse ¶
func (cb *Callbacks) OnFetchResponse(req *discovery.DiscoveryRequest, res *discovery.DiscoveryResponse)
OnFetchResponse prints debug logs
func (*Callbacks) OnStreamClosed ¶
OnStreamClosed prints debug logs
func (*Callbacks) OnStreamDeltaRequest ¶
func (cb *Callbacks) OnStreamDeltaRequest(id int64, req *discovery.DeltaDiscoveryRequest) error
OnStreamDeltaRequest is unused.
func (*Callbacks) OnStreamDeltaResponse ¶
func (cb *Callbacks) OnStreamDeltaResponse(id int64, req *discovery.DeltaDiscoveryRequest, res *discovery.DeltaDiscoveryResponse)
OnStreamDeltaResponse is unused.
func (*Callbacks) OnStreamOpen ¶
OnStreamOpen prints debug logs
func (*Callbacks) OnStreamRequest ¶
func (cb *Callbacks) OnStreamRequest(id int64, request *discovery.DiscoveryRequest) error
OnStreamRequest prints debug logs
func (*Callbacks) OnStreamResponse ¶
func (cb *Callbacks) OnStreamResponse(context context.Context, id int64, request *discovery.DiscoveryRequest, response *discovery.DiscoveryResponse)
OnStreamResponse prints debug logs
type EnforcerInternalAPI ¶
type EnforcerInternalAPI struct {
// contains filtered or unexported fields
}
EnforcerInternalAPI struct use to hold enforcer resources
type EnvoyGatewayConfig ¶
type EnvoyGatewayConfig struct {
// contains filtered or unexported fields
}
EnvoyGatewayConfig struct use to hold envoy gateway resources
type EnvoyInternalAPI ¶
type EnvoyInternalAPI struct {
// contains filtered or unexported fields
}
EnvoyInternalAPI struct use to hold envoy resources and adapter internal resources
Directories
¶
Path | Synopsis |
---|---|
Package common includes the common functions shared between enforcer and router callbacks.
|
Package common includes the common functions shared between enforcer and router callbacks. |