33 template <
typename Req,
typename Resp = Req>
65 template <
typename ReqA,
typename RespA,
66 typename ReqB = ReqA,
typename RespB = RespA>
70 : service_(service) {}
74 return service_->close();
78 return service_->isAvailable();
82 std::shared_ptr<Service<ReqB, RespB>>
service_;
91 template <
typename Pipeline,
typename Req,
typename Resp>
102 template <
typename Pipeline,
typename Req,
typename Resp>
106 : service_(service) {}
116 template <
typename Pipeline,
typename ReqA,
typename RespA,
117 typename ReqB = ReqA,
typename RespB = RespA>
122 : serviceFactory_(
std::
move(serviceFactory)) {}
130 template <
typename Pipeline,
typename Req,
typename Resp = Req>
135 : factory_(factory) {}
140 return ((*factory_)(
nullptr))
142 return (*service)(
std::move(request)).ensure([
this]() {
149 std::shared_ptr<ServiceFactory<Pipeline, Req, Resp>>
factory_;
FactoryToService(std::shared_ptr< ServiceFactory< Pipeline, Req, Resp >> factory)
folly::Future< std::shared_ptr< Service< Req, Resp > > > operator()(std::shared_ptr< ClientBootstrap< Pipeline >>) override
folly::Future< folly::Unit > close() override
std::shared_ptr< ServiceFactory< Pipeline, Req, Resp > > factory_
virtual folly::Future< Resp > operator()(Req request)=0
virtual folly::Future< folly::Unit > close()
ServiceFilter(std::shared_ptr< Service< ReqB, RespB >> service)
constexpr detail::Map< Move > move
std::shared_ptr< ServiceFactory< Pipeline, ReqB, RespB > > serviceFactory_
std::shared_ptr< Service< ReqB, RespB > > service_
folly::Future< Resp > operator()(Req request) override
std::shared_ptr< Service< Req, Resp > > service_
virtual ~Service()=default
bool isAvailable() override
ServiceFactoryFilter(std::shared_ptr< ServiceFactory< Pipeline, ReqB, RespB >> serviceFactory)
ConstFactory(std::shared_ptr< Service< Req, Resp >> service)
virtual bool isAvailable()
Future< typename std::decay< T >::type > makeFuture(T &&t)