seninel部署
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Eric Zhao a0196b6b00 Bump version to 1.8.0-SNAPSHOT 4 anos atrás
..
src Polish placeholders in logging content to slf4j convention (#1342) 4 anos atrás
README.md Improve ConsulDataSource and add README.md for the module 5 anos atrás
pom.xml Bump version to 1.8.0-SNAPSHOT 4 anos atrás

README.md

Sentinel DataSource Consul

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

NOTE: This module requires JDK 1.8 or later.

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