Skip to content

Commit

Permalink
make ratelimit struct no longer exported
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Jan 28, 2025
1 parent ac68131 commit 227c1cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions internal/configs/virtualserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ func (vsc *virtualServerConfigurator) GenerateVirtualServerConfig(
return vsCfg, vsc.warnings
}

// RateLimit hold the configuration for the ratelimiting Policy
type RateLimit struct {
// rateLimit hold the configuration for the ratelimiting Policy
type rateLimit struct {
Reqs []version2.LimitReq
Zones []version2.LimitReqZone
Options version2.LimitReqOptions
Expand All @@ -901,7 +901,7 @@ type RateLimit struct {
type policiesCfg struct {
Allow []string
Deny []string
RateLimit RateLimit
RateLimit rateLimit
JWTAuth *version2.JWTAuth
JWTAuthList map[string]*version2.JWTAuth
JWKSAuthEnabled bool
Expand Down
8 changes: 4 additions & 4 deletions internal/configs/virtualserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6587,7 +6587,7 @@ func TestGeneratePolicies(t *testing.T) {
},
},
expected: policiesCfg{
RateLimit: RateLimit{
RateLimit: rateLimit{
Reqs: []version2.LimitReq{
{
ZoneName: "pol_rl_default_rateLimit-policy_default_test",
Expand Down Expand Up @@ -6641,7 +6641,7 @@ func TestGeneratePolicies(t *testing.T) {
},
},
expected: policiesCfg{
RateLimit: RateLimit{
RateLimit: rateLimit{
Zones: []version2.LimitReqZone{
{
Key: "test",
Expand Down Expand Up @@ -6693,7 +6693,7 @@ func TestGeneratePolicies(t *testing.T) {
},
},
expected: policiesCfg{
RateLimit: RateLimit{
RateLimit: rateLimit{
Zones: []version2.LimitReqZone{
{
Key: "test",
Expand Down Expand Up @@ -7404,7 +7404,7 @@ func TestGeneratePoliciesFails(t *testing.T) {
},
policyOpts: policyOptions{},
expected: policiesCfg{
RateLimit: RateLimit{
RateLimit: rateLimit{
Zones: []version2.LimitReqZone{
{
Key: "test",
Expand Down

0 comments on commit 227c1cc

Please sign in to comment.