Skip to content

Commit acad26a

Browse files
committed
Merge pull request #148 from brharrington/rxnetty-module
use iep module to setup rxhttp client
2 parents e8d1a85 + 3ad1891 commit acad26a

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version_archaius1=0.6.6
22
version_archaius=2.0.0-rc.8
33
version_aws=1.9.23
4-
version_iep=0.1.13.1
4+
version_iep=0.1.16.4
55
version_jackson=2.5.2
66
version_log4j=2.2
77
version_ribbon=2.0.0

spectator-nflx-plugin/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies {
88
compile "com.google.inject:guice:3.0"
99
compile "com.netflix.archaius:archaius-core:$version_archaius1"
1010
compile "com.netflix.eureka:eureka-client:1.1.147"
11+
compile "com.netflix.iep-shadow:iepshadow-iep-module-rxnetty:$version_iep"
1112
compile "com.netflix.iep-shadow:iepshadow-iep-rxhttp:$version_iep"
1213
testCompile "com.netflix.governator:governator:1.3.3"
1314
}

spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/SpectatorModule.java

+2-12
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@
1616
package com.netflix.spectator.nflx;
1717

1818
import com.google.inject.AbstractModule;
19-
import com.google.inject.Provides;
20-
import com.netflix.discovery.DiscoveryClient;
21-
import iep.com.netflix.iep.http.EurekaServerRegistry;
22-
import iep.com.netflix.iep.http.RxHttp;
23-
import iep.com.netflix.iep.http.ServerRegistry;
2419
import com.netflix.spectator.api.ExtendedRegistry;
2520
import com.netflix.spectator.api.Registry;
2621
import com.netflix.spectator.api.Spectator;
22+
import iep.com.netflix.iep.rxnetty.RxNettyModule;
2723

2824
/**
2925
* Guice module to configure the appropriate bindings for running an application. Note that this
@@ -60,18 +56,12 @@
6056
*/
6157
public final class SpectatorModule extends AbstractModule {
6258
@Override protected void configure() {
63-
bind(RxHttp.class).asEagerSingleton();
59+
install(new RxNettyModule());
6460
bind(Plugin.class).asEagerSingleton();
6561
bind(ExtendedRegistry.class).toInstance(Spectator.registry());
6662
bind(Registry.class).toInstance(Spectator.registry());
6763
}
6864

69-
/** Returns an instance of a server registry based on eureka. */
70-
@Provides
71-
public ServerRegistry getServerRegistry(DiscoveryClient client) {
72-
return new EurekaServerRegistry(client);
73-
}
74-
7565
@Override public boolean equals(Object obj) {
7666
return obj != null && getClass().equals(obj.getClass());
7767
}

0 commit comments

Comments
 (0)