-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework Filter category into an enum FilterCategory
- Loading branch information
1 parent
44da1cd
commit 9191ff8
Showing
3 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
zuul-core/src/main/java/com/netflix/zuul/filters/FilterCategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright 2022 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.zuul.filters; | ||
|
||
/** | ||
* Categorization of filters. | ||
*/ | ||
public enum FilterCategory { | ||
|
||
ABUSE("abuse", "Abuse detection and protection filters, such as rate-limiting, malicious request detection, geo-blocking"), | ||
ACCESS("access", "Authentication and authorization filters"), | ||
ADMIN("admin", "Admin only filters providing operational support"), | ||
CHAOS("chaos", "Failure injection testing and resilience support"), | ||
CONTEXT_DECORATOR("context-decorator", "Decorate context based on request and detected client"), | ||
HEALTHCHECK("healthcheck", "Support for healthcheck endpoints"), | ||
HTTP("http", "Filter operating on HTTP request/response protocol features"), | ||
ORIGIN("origin", "Origin connectivity filters"), | ||
OBSERVABILITY("observability", "Filters providing observability features"), | ||
OVERLOAD("overload", "Filters to respond on the server being in an overloaded state such as brownout"), | ||
ROUTING("routing", "Filters which make routing decisions"), | ||
; | ||
|
||
private final String code; | ||
private final String description; | ||
|
||
FilterCategory(String code, String description) { | ||
this.code = code; | ||
this.description = description; | ||
} | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return code; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters