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
yukdawn
committed
Apr 5, 2022
1 parent
95f340d
commit 6fe63fa
Showing
10 changed files
with
217 additions
and
190 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
21 changes: 21 additions & 0 deletions
21
src/main/java/com/github/lianjiatech/retrofit/spring/boot/degrade/DegradeRuleRegister.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,21 @@ | ||
package com.github.lianjiatech.retrofit.spring.boot.degrade; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
/** | ||
* @author [email protected] 2022/4/5 23:14 | ||
*/ | ||
public interface DegradeRuleRegister { | ||
|
||
void register(RetrofitDegradeRule retrofitDegradeRule); | ||
|
||
void batchRegister(List<RetrofitDegradeRule> retrofitDegradeRuleList); | ||
|
||
<T> T exec(String resourceName, DegradeProxyMethod<T> func) throws IOException; | ||
|
||
@FunctionalInterface | ||
interface DegradeProxyMethod<R>{ | ||
R get() throws IOException; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -7,4 +7,6 @@ public enum DegradeType { | |
|
||
SENTINEL, | ||
|
||
RESILIENCE4J; | ||
|
||
} |
Oops, something went wrong.