reverse_proxy.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:simphony-remote 作者: simphony 项目源码 文件源码
def unregister(self, urlpath):
        """Unregisters a previously registered urlpath.
        If the urlpath is not found in the reverse proxy, it will not raise
        an error, but it will log the unexpected circumstance.

        Parameters
        ----------
        urlpath: str
            The absolute path of the url (e.g. /my/internal/service/"
        """
        self.log.info("Deregistering {} redirection".format(urlpath))

        try:
            yield self._reverse_proxy.api_request(urlpath, method='DELETE')
        except httpclient.HTTPError as e:
            if e.code == 404:
                self.log.warning("Could not find urlpath {} when removing"
                                 " container. In any case, the reverse proxy"
                                 " does not map the url. Continuing".format(
                                     urlpath))
            else:
                raise e
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号