forked from ReactiveX/RxJava
-
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.
Issue ReactiveX#179: Migrated Spring Boot 2 Actuator endpoints
- Loading branch information
Robert Winkler
committed
Mar 16, 2018
1 parent
204609f
commit 3e55b50
Showing
15 changed files
with
144 additions
and
398 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
dependencies { | ||
compile ( libraries.spring_boot2_aop ) | ||
compile ( libraries.spring_boot2_actuator ) | ||
compile ( libraries.spring_boot2_web ) | ||
compile ( libraries.spring_reactor ) | ||
compile project(':resilience4j-micrometer') | ||
compile project(':resilience4j-circuitbreaker') | ||
compile project(':resilience4j-ratelimiter') | ||
compile project(':resilience4j-consumer') | ||
testCompile ( libraries.spring_boot2_test ) | ||
testCompile ( libraries.spring_boot2_web ) | ||
} |
37 changes: 0 additions & 37 deletions
37
resilience4j-spring-boot2/src/main/java/io/github/resilience4j/adapter/ReactorAdapter.java
This file was deleted.
Oops, something went wrong.
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
43 changes: 43 additions & 0 deletions
43
...ava/io/github/resilience4j/circuitbreaker/monitoring/endpoint/CircuitBreakerEndpoint.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,43 @@ | ||
/* | ||
* Copyright 2017 Robert Winkler | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.resilience4j.circuitbreaker.monitoring.endpoint; | ||
|
||
|
||
import java.util.List; | ||
|
||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | ||
import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpoint; | ||
|
||
import io.github.resilience4j.circuitbreaker.CircuitBreaker; | ||
import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry; | ||
|
||
|
||
@WebEndpoint(id = "circuitbreaker") | ||
public class CircuitBreakerEndpoint { | ||
|
||
private final CircuitBreakerRegistry circuitBreakerRegistry; | ||
|
||
public CircuitBreakerEndpoint(CircuitBreakerRegistry circuitBreakerRegistry) { | ||
this.circuitBreakerRegistry = circuitBreakerRegistry; | ||
} | ||
|
||
@ReadOperation | ||
public CircuitBreakerEndpointResponse getAllCircuitBreakers() { | ||
List<String> circuitBreakers = circuitBreakerRegistry.getAllCircuitBreakers() | ||
.map(CircuitBreaker::getName).sorted().toJavaList(); | ||
return new CircuitBreakerEndpointResponse(circuitBreakers); | ||
} | ||
} |
45 changes: 0 additions & 45 deletions
45
...io/github/resilience4j/circuitbreaker/monitoring/endpoint/CircuitBreakerEventEmitter.java
This file was deleted.
Oops, something went wrong.
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
42 changes: 42 additions & 0 deletions
42
...main/java/io/github/resilience4j/ratelimiter/monitoring/endpoint/RateLimiterEndpoint.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,42 @@ | ||
/* | ||
* Copyright 2017 Bohdan Storozhuk | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.resilience4j.ratelimiter.monitoring.endpoint; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | ||
import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpoint; | ||
|
||
import io.github.resilience4j.ratelimiter.RateLimiter; | ||
import io.github.resilience4j.ratelimiter.RateLimiterRegistry; | ||
import io.github.resilience4j.ratelimiter.monitoring.model.RateLimiterEndpointResponse; | ||
|
||
@WebEndpoint(id = "ratelimiter") | ||
public class RateLimiterEndpoint { | ||
|
||
private final RateLimiterRegistry rateLimiterRegistry; | ||
|
||
public RateLimiterEndpoint(RateLimiterRegistry rateLimiterRegistry) { | ||
this.rateLimiterRegistry = rateLimiterRegistry; | ||
} | ||
|
||
@ReadOperation | ||
public RateLimiterEndpointResponse getAllRateLimiters() { | ||
List<String> names = rateLimiterRegistry.getAllRateLimiters() | ||
.map(RateLimiter::getName).sorted().toJavaList(); | ||
return new RateLimiterEndpointResponse(names); | ||
} | ||
} |
Oops, something went wrong.