Package titan.balancer
Class NginxAdapter
java.lang.Object
titan.balancer.NginxAdapter
- All Implemented Interfaces:
IngressAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate ConcurrentHashMap<String,List<String>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFlushes the current state to the Load Balancer and triggers a hot-reload.voiddeRegisterService(String serviceName, String workerIp, int port) Called by the Master when a worker crashes or a service is scaled down.voidregisterService(String serviceName, String workerIp, int port) Called by the Master when a worker successfully starts a long-running service.
-
Field Details
-
routeTable
-
NGINX_CONF_PATH
- See Also:
-
-
Constructor Details
-
NginxAdapter
public NginxAdapter()
-
-
Method Details
-
registerService
Description copied from interface:IngressAdapterCalled by the Master when a worker successfully starts a long-running service.- Specified by:
registerServicein interfaceIngressAdapter
-
deRegisterService
Description copied from interface:IngressAdapterCalled by the Master when a worker crashes or a service is scaled down.- Specified by:
deRegisterServicein interfaceIngressAdapter
-
applyRoutingConfig
public void applyRoutingConfig()Description copied from interface:IngressAdapterFlushes the current state to the Load Balancer and triggers a hot-reload.- Specified by:
applyRoutingConfigin interfaceIngressAdapter
-
getActiveRoutes
- Specified by:
getActiveRoutesin interfaceIngressAdapter
-