seninel部署
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Eric Zhao fca70646ad Bump version to 1.8.2-SNAPSHOT pirms 3 gadiem
..
src Polish placeholders in logging content to slf4j convention (#1342) pirms 4 gadiem
README.md Update source/target JDK version to 1.8 and update documents pirms 3 gadiem
pom.xml Bump version to 1.8.2-SNAPSHOT pirms 3 gadiem

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