All Downloads are FREE. Search and download functionalities are using the official Maven repository.

netflix.karyon.examples.hellonoss.server.rxnetty.MyApplicationRunner Maven / Gradle / Ivy

The newest version!
package netflix.karyon.examples.hellonoss.server.rxnetty;

import netflix.adminresources.resources.KaryonWebAdminModule;
import netflix.karyon.Karyon;
import netflix.karyon.KaryonBootstrapModule;
import netflix.karyon.ShutdownModule;
import netflix.karyon.archaius.ArchaiusBootstrapModule;
import netflix.karyon.examples.hellonoss.common.health.HealthCheck;
import netflix.karyon.servo.KaryonServoModule;
import netflix.karyon.transport.http.health.HealthCheckEndpoint;

/**
 * @author Nitesh Kant
 */
public class MyApplicationRunner {

    public static void main(String[] args) {
        HealthCheck healthCheckHandler = new HealthCheck();
        Karyon.forRequestHandler(8888,
                                 new RxNettyHandler("/healthcheck",
                                                    new HealthCheckEndpoint(healthCheckHandler)),
                                 new KaryonBootstrapModule(healthCheckHandler),
                                 new ArchaiusBootstrapModule("hello-netflix-oss"),
                                 // KaryonEurekaModule.asBootstrapModule(), /* Uncomment if you need eureka */
                                 KaryonWebAdminModule.asBootstrapModule(),
                                 ShutdownModule.asBootstrapModule(),
                                 KaryonServoModule.asBootstrapModule())
              .startAndWaitTillShutdown();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy