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

com.liveperson.faas.csds.CsdsMapClient Maven / Gradle / Ivy

Go to download

Functions client for invoking lambdas via the eventsource gateway (a.k.a Asgard)

There is a newer version: 1.2.3
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy