seninel部署
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Bo 57f9bc7a6a
Upgrade nacos-client version to 1.3.0 in sentinel-datasource-nacos (#1576)
4 лет назад
..
src/main/java/com/alibaba/csp/sentinel/datasource/nacos Upgrade nacos-client version and construct NacosDataSource by Properties (#348) 6 лет назад
README.md Refactor Sentinel data source hierarchy 6 лет назад
pom.xml Upgrade nacos-client version to 1.3.0 in sentinel-datasource-nacos (#1576) 4 лет назад

README.md

Sentinel DataSource Nacos

Sentinel DataSource Nacos provides integration with Nacos so that Nacos can be the dynamic rule data source of Sentinel.

To use Sentinel DataSource Nacos, you should add the following dependency:

<dependency>
    <groupId>com.alibaba.csp</groupId>
    <artifactId>sentinel-datasource-nacos</artifactId>
    <version>x.y.z</version>
</dependency>

Then you can create an NacosDataSource and register to rule managers. For instance:

// remoteAddress is the address of Nacos
// groupId and dataId are concepts of Nacos
ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new NacosDataSource<>(remoteAddress, groupId, dataId,
    source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {}));
FlowRuleManager.register2Property(flowRuleDataSource.getProperty());

We’ve also provided an example: sentinel-demo-nacos-datasource.