Skip to content

Commit

Permalink
[type:feat] add shenyu gateway namespace (#5671)
Browse files Browse the repository at this point in the history
* [type:feat] add shenyu gateway namespace

* [type:feat] add shenyu gateway namespace

* [type:feat] add shenyu gateway namespace

* [type:feat] add shenyu gateway namespace
  • Loading branch information
moremind authored Sep 25, 2024
1 parent 87a90d7 commit 26e590a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
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

0 comments on commit 26e590a

Please sign in to comment.