Search in sources :

Example 1 with HealthCheckModule

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);
}
Also used : Injector(com.google.inject.Injector) ConfigModule(io.cdap.cdap.common.guice.ConfigModule) HealthCheckModule(io.cdap.cdap.common.guice.HealthCheckModule) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) CoreV1Api(io.kubernetes.client.openapi.apis.CoreV1Api) HealthCheckImplementation(io.cdap.cdap.common.implementation.HealthCheckImplementation) BeforeClass(org.junit.BeforeClass)

Example 2 with HealthCheckModule

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());
}
Also used : HealthCheckHttpHandler(io.cdap.cdap.gateway.handlers.HealthCheckHttpHandler) SupportBundleHttpHandler(io.cdap.cdap.support.handlers.SupportBundleHttpHandler) HttpHandler(io.cdap.http.HttpHandler) SupportBundleInternalService(io.cdap.cdap.support.internal.app.services.SupportBundleInternalService) HealthCheckModule(io.cdap.cdap.common.guice.HealthCheckModule) SupportBundleTaskFactory(io.cdap.cdap.support.task.factory.SupportBundleTaskFactory)

Aggregations

HealthCheckModule (io.cdap.cdap.common.guice.HealthCheckModule)2 Injector (com.google.inject.Injector)1 CConfiguration (io.cdap.cdap.common.conf.CConfiguration)1 ConfigModule (io.cdap.cdap.common.guice.ConfigModule)1 HealthCheckImplementation (io.cdap.cdap.common.implementation.HealthCheckImplementation)1 HealthCheckHttpHandler (io.cdap.cdap.gateway.handlers.HealthCheckHttpHandler)1 SupportBundleHttpHandler (io.cdap.cdap.support.handlers.SupportBundleHttpHandler)1 SupportBundleInternalService (io.cdap.cdap.support.internal.app.services.SupportBundleInternalService)1 SupportBundleTaskFactory (io.cdap.cdap.support.task.factory.SupportBundleTaskFactory)1 HttpHandler (io.cdap.http.HttpHandler)1 CoreV1Api (io.kubernetes.client.openapi.apis.CoreV1Api)1 BeforeClass (org.junit.BeforeClass)1