seninel部署
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Eric Zhao be2715d814 Update source/target JDK version to 1.8 and update documents преди 3 години
..
src Polish placeholders in logging content to slf4j convention (#1342) преди 4 години
README.md Update source/target JDK version to 1.8 and update documents преди 3 години
pom.xml CI: Polish dependencies for ARM64 and add ARM64 job to Travis CI (#1765) преди 4 години

README.md

Sentinel DataSource Consul

Sentinel DataSource Consul provides integration with Consul. The data source leverages blocking query (backed by long polling) of Consul.

Usage

To use Sentinel DataSource Consul, you could add the following dependency:

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

Then you can create a ConsulDataSource and register to rule managers. For instance:

ReadableDataSource<String, List<FlowRule>> dataSource = new ConsulDataSource<>(host, port, ruleKey, waitTimeoutInSecond, flowConfigParser);
FlowRuleManager.register2Property(dataSource.getProperty());
  • ruleKey: the rule persistence key
  • waitTimeoutInSecond: long polling timeout (in second) of the Consul API client