forked from LianjiaTech/retrofit-spring-boot-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ff5254
commit f50cfbb
Showing
12 changed files
with
184 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
src/main/java/com/github/lianjiatech/retrofit/spring/boot/degrade/Degrade.java
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/main/java/com/github/lianjiatech/retrofit/spring/boot/degrade/DegradeStrategy.java
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
src/main/java/com/github/lianjiatech/retrofit/spring/boot/degrade/RetrofitDegradeRule.java
This file was deleted.
Oops, something went wrong.
98 changes: 0 additions & 98 deletions
98
...a/com/github/lianjiatech/retrofit/spring/boot/degrade/RetrofitDegradeRuleInitializer.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/main/java/com/github/lianjiatech/retrofit/spring/boot/degrade/SentinelDegrade.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.github.lianjiatech.retrofit.spring.boot.degrade; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author 陈添明 | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.METHOD, ElementType.TYPE}) | ||
@Documented | ||
public @interface SentinelDegrade { | ||
|
||
/** | ||
* RT模式下为慢调用临界 RT(超出该值计为慢调用);异常比例/异常数模式下为对应的阈值 | ||
*/ | ||
double count(); | ||
|
||
/** | ||
* 熔断时长,单位为 s | ||
*/ | ||
int timeWindow() default 5; | ||
|
||
/** | ||
* 降级策略(0:平均响应时间;1:异常比例;2:异常数量) | ||
*/ | ||
int grade() default 0; | ||
} |
Oops, something went wrong.