Skip to content

cooldown: add package pattern overrides - #243

Open
ksivamuthu-cei wants to merge 1 commit into
git-pkgs:mainfrom
ksivamuthu-cei:feat/cooldown-package-patterns
Open

cooldown: add package pattern overrides#243
ksivamuthu-cei wants to merge 1 commit into
git-pkgs:mainfrom
ksivamuthu-cei:feat/cooldown-package-patterns

Conversation

@ksivamuthu-cei

Copy link
Copy Markdown

Summary

Add proxy-level cooldown package-pattern overrides as a policy wrapper, without changing the cooldown library.

  • add internal/cooldownpolicy, implementing the handler cooldown policy interface;
  • apply duration overrides for canonical PURL globs, with exact package overrides taking precedence;
  • normalize @ to %40 in configured patterns, matching canonical PURL lookup behavior;
  • validate glob patterns and durations when starting the server; and
  • document cooldown.package_patterns.

This is an initial policy layer for #127 and keeps namespace matching independent from the cooldown library, so it can later support other package-filtering policies.

Validation

  • go test ./...
  • go vet ./...
  • go build ./cmd/proxy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant