Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[type:feat] add shenyu gateway namespace #5671

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shenyu-bootstrap/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ management:
- 'health'
- 'info'
shenyu:
namespace: "649330b6-c2d7-4edc-be8e-8a54df9eb385"
selectorMatchCache:
## selector L1 cache
cache:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,26 @@ public class ShenyuConfig {

private AlertConfig alert = new AlertConfig();

private String namespace = Constants.SYS_DEFAULT_NAMESPACE_ID;

/**
* shenyu bootstrap namespace.
*
* @return namespace id
*/
public String getNamespace() {
return namespace;
}

/**
* Set shenyu bootstrap namespace, default value is {@link org.apache.shenyu.common.constant.Constants#SYS_DEFAULT_NAMESPACE_ID}.
*
* @param namespace namespace id
*/
public void setNamespace(final String namespace) {
this.namespace = namespace;
}

/**
* Gets health.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,11 @@ public interface Constants {
*/
String METRICS_HYSTRIX = "metricsHystrix";

/**
* The constant shenyu namespace id.
*/
String SHENYU_NAMESPACE_ID = "namespaceId";

/**
* The constant SYS_DEFAULT_NAMESPACE_ID.
*/
Expand Down
Loading