From 3ad18911e8247b57e8b4d656d33ca95d30fc3f4e Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Wed, 22 Apr 2015 09:53:04 -0700 Subject: [PATCH] use iep module to setup rxhttp client --- gradle.properties | 2 +- spectator-nflx-plugin/build.gradle | 1 + .../netflix/spectator/nflx/SpectatorModule.java | 14 ++------------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/gradle.properties b/gradle.properties index f78a6c2e3..a4c4f9dae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ version_archaius1=0.6.6 version_archaius=2.0.0-rc.8 version_aws=1.9.23 -version_iep=0.1.13.1 +version_iep=0.1.16.4 version_jackson=2.5.2 version_log4j=2.2 version_ribbon=2.0.0 diff --git a/spectator-nflx-plugin/build.gradle b/spectator-nflx-plugin/build.gradle index 3e504ede1..252d64b1a 100644 --- a/spectator-nflx-plugin/build.gradle +++ b/spectator-nflx-plugin/build.gradle @@ -8,6 +8,7 @@ dependencies { compile "com.google.inject:guice:3.0" compile "com.netflix.archaius:archaius-core:$version_archaius1" compile "com.netflix.eureka:eureka-client:1.1.147" + compile "com.netflix.iep-shadow:iepshadow-iep-module-rxnetty:$version_iep" compile "com.netflix.iep-shadow:iepshadow-iep-rxhttp:$version_iep" testCompile "com.netflix.governator:governator:1.3.3" } diff --git a/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/SpectatorModule.java b/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/SpectatorModule.java index 4ca86d8e9..817ec444a 100644 --- a/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/SpectatorModule.java +++ b/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/SpectatorModule.java @@ -16,14 +16,10 @@ package com.netflix.spectator.nflx; import com.google.inject.AbstractModule; -import com.google.inject.Provides; -import com.netflix.discovery.DiscoveryClient; -import iep.com.netflix.iep.http.EurekaServerRegistry; -import iep.com.netflix.iep.http.RxHttp; -import iep.com.netflix.iep.http.ServerRegistry; import com.netflix.spectator.api.ExtendedRegistry; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.Spectator; +import iep.com.netflix.iep.rxnetty.RxNettyModule; /** * Guice module to configure the appropriate bindings for running an application. Note that this @@ -60,18 +56,12 @@ */ public final class SpectatorModule extends AbstractModule { @Override protected void configure() { - bind(RxHttp.class).asEagerSingleton(); + install(new RxNettyModule()); bind(Plugin.class).asEagerSingleton(); bind(ExtendedRegistry.class).toInstance(Spectator.registry()); bind(Registry.class).toInstance(Spectator.registry()); } - /** Returns an instance of a server registry based on eureka. */ - @Provides - public ServerRegistry getServerRegistry(DiscoveryClient client) { - return new EurekaServerRegistry(client); - } - @Override public boolean equals(Object obj) { return obj != null && getClass().equals(obj.getClass()); }