use of io.cdap.cdap.common.guice.HealthCheckModule in project cdap by caskdata.
the class HealthCheckImplementationTest method setup.
@BeforeClass
public static void setup() throws Exception {
CConfiguration cConf = CConfiguration.create();
Injector injector = Guice.createInjector(new ConfigModule(cConf), new HealthCheckModule());
healthCheckImplementation = injector.getInstance(HealthCheckImplementation.class);
coreV1Api = mock(CoreV1Api.class);
}
use of io.cdap.cdap.common.guice.HealthCheckModule in project cdap by caskdata.
the class SupportBundleServiceModule method configure.
@Override
protected void configure() {
Multibinder<HttpHandler> handlerBinder = Multibinder.newSetBinder(binder(), HttpHandler.class, Names.named(Constants.SupportBundle.HANDLERS_NAME));
CommonHandlers.add(handlerBinder);
handlerBinder.addBinding().to(SupportBundleHttpHandler.class);
handlerBinder.addBinding().to(HealthCheckHttpHandler.class);
bind(SupportBundleInternalService.class).in(Scopes.SINGLETON);
Multibinder<SupportBundleTaskFactory> supportBundleTaskFactoryMultibinder = Multibinder.newSetBinder(binder(), SupportBundleTaskFactory.class, Names.named(Constants.SupportBundle.TASK_FACTORY));
supportBundleTaskFactoryMultibinder.addBinding().to(SupportBundlePipelineInfoTaskFactory.class);
supportBundleTaskFactoryMultibinder.addBinding().to(SupportBundleSystemLogTaskFactory.class);
supportBundleTaskFactoryMultibinder.addBinding().to(SupportBundleK8sHealthCheckTaskFactory.class);
install(new HealthCheckModule());
}
Aggregations