com.liveperson.faas.csds.CsdsMapClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functions-client Show documentation
Show all versions of functions-client Show documentation
Functions client for invoking lambdas via the eventsource gateway (a.k.a Asgard)
package com.liveperson.faas.csds;
import com.liveperson.faas.exception.CsdsRetrievalException;
import java.util.Map;
public class CsdsMapClient implements CsdsClient {
Map serviceMap;
public CsdsMapClient(Map serviceMap) {
this.serviceMap = serviceMap;
}
@Override
public String getDomain(String service) throws CsdsRetrievalException {
if (serviceMap.get(service) == null) {
throw new CsdsRetrievalException(String.format(
"Service with name %s could not be found " +
"in domains", service));
}
return serviceMap.get(service);
}
}