Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apollo flow rule publisher sample in Sentinel dashboard #535

Merged
merged 3 commits into from
Mar 4, 2019
Merged

Add Apollo flow rule publisher sample in Sentinel dashboard #535

merged 3 commits into from
Mar 4, 2019

Conversation

hantianwei
Copy link
Contributor

Describe what this PR does / why we need it

sentinel-dashboard 项目Test目录下新增数据源固化到Apollo实现

Does this pull request fix one issue?

Describe how you did it

通过官方的apollo-openapi实现数据源存取

Describe how to verify it

把sentinel-dashboard 项目Test目录下Apollo相关代码加载到项目中,然后在FlowControllerV2.java中修改
如下代码后,运行即可,此代码在实际项目中已运行

 @Autowired
    @Qualifier("flowRuleApolloProvider")
    private DynamicRuleProvider<List<FlowRuleEntity>> ruleProvider;
    @Autowired
    @Qualifier("flowRuleApolloPublisher")
    private DynamicRulePublisher<List<FlowRuleEntity>> rulePublisher;

Special notes for reviews

因为用到了Apollo的OpenAPI,所以引用了apollo-openapi这个包来实现

@CLAassistant
Copy link

CLAassistant commented Mar 3, 2019

CLA assistant check
All committers have signed the CLA.

@codecov-io
Copy link

codecov-io commented Mar 3, 2019

Codecov Report

Merging #535 into master will increase coverage by 0.55%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #535      +/-   ##
============================================
+ Coverage     37.69%   38.24%   +0.55%     
- Complexity     1102     1116      +14     
============================================
  Files           259      259              
  Lines          8174     8174              
  Branches       1113     1113              
============================================
+ Hits           3081     3126      +45     
+ Misses         4695     4642      -53     
- Partials        398      406       +8
Impacted Files Coverage Δ Complexity Δ
...a/csp/sentinel/slots/statistic/base/LeapArray.java 69.62% <0%> (+3.79%) 25% <0%> (+1%) ⬆️
...a/csp/sentinel/slots/statistic/base/LongAdder.java 34.04% <0%> (+17.02%) 11% <0%> (+7%) ⬆️
...a/csp/sentinel/slots/statistic/base/Striped64.java 61.45% <0%> (+35.41%) 11% <0%> (+6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e4fc7a...5a4bc12. Read the comment docs.

@sczyh30 sczyh30 added to-review To review area/dashboard Issues or PRs about Sentinel Dashboard labels Mar 3, 2019
Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sczyh30 sczyh30 changed the title Master apollo data source Add Apollo flow rule publisher sample in Sentinel dashboard Mar 4, 2019
@sczyh30 sczyh30 merged commit b54461b into alibaba:master Mar 4, 2019
@sczyh30
Copy link
Member

sczyh30 commented Mar 4, 2019

Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard Issues or PRs about Sentinel Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants