Skip to content

Commit

Permalink
Add resource name mapping for rate limit xDS resource
Browse files Browse the repository at this point in the history
Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
  • Loading branch information
renuka-fernando committed Oct 18, 2022
1 parent d0a39a0 commit c08a5a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cache/v3/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"github.com/envoyproxy/go-control-plane/pkg/cache/types"
"github.com/envoyproxy/go-control-plane/pkg/resource/v3"
"github.com/envoyproxy/go-control-plane/pkg/wellknown"
ratelimit "github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3"
)

// GetResponseType returns the enumeration for a valid xDS type URL.
Expand Down Expand Up @@ -109,6 +110,8 @@ func GetResourceName(res types.Resource) string {
return v.GetName()
case *core.TypedExtensionConfig:
return v.GetName()
case *ratelimit.RateLimitConfig:
return v.GetDomain()
default:
return ""
}
Expand Down

0 comments on commit c08a5a9

Please sign in to comment.