use of com.hotels.styx.routing.StaticPipelineFactory in project styx by ExpediaGroup.
the class StyxPipelineFactory method configuredPipeline.
private RoutingObject configuredPipeline(RoutingObjectFactory.Context routingObjectFactoryContext) {
boolean requestTracking = environment.configuration().get("requestTracking", Boolean.class).orElse(false);
Optional<JsonNode> rootHandlerNode = environment.configuration().get("httpPipeline", JsonNode.class);
if (rootHandlerNode.isPresent()) {
return Builtins.build(List.of("httpPipeline"), routingObjectFactoryContext, toRoutingConfigNode(rootHandlerNode.get()));
}
Registry<BackendService> registry = (Registry<BackendService>) services.get("backendServiceRegistry");
return new StaticPipelineFactory(environment, registry != null ? registry : new MemoryBackedRegistry<>(), plugins, executor, requestTracking).build();
}
Aggregations