Skip to content

Commit

Permalink
Merge pull request #3 from abbas-gheydi/main
Browse files Browse the repository at this point in the history
expose RlsParser
  • Loading branch information
abbas-gheydi authored Apr 13, 2024
2 parents e7cef9d + 36c8393 commit a724de5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy/charts/rls-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 1.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"
appVersion: "1.0.0"
14 changes: 14 additions & 0 deletions rls_parser.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import (
contourv1 "github.com/projectcontour/contour/apis/projectcontour/v1"
"github.com/snapp-incubator/contour-global-ratelimit-operator/internal/parser"
)

// RLSParser is used to extract rate limit configs from httpproxy.
type RlsParser struct{}

// ExtractRlsDescriptors is a wrapper around the internal parser package.
func (r *RlsParser) ExtractRlsDescriptors(httpProxy *contourv1.HTTPProxy) (hasRateLimitConfig bool, policies parser.HTTPProxyGlobalRateLimitPolicy, err error) {
return parser.ExtractDescriptorsFromHTTPProxy(httpProxy)
}

0 comments on commit a724de5

Please sign in to comment.