Commit 9fd2e4df by Amir Aharon

using client from init

parent 8468cd1b
Showing with 5 additions and 4 deletions
...@@ -120,7 +120,7 @@ public: ...@@ -120,7 +120,7 @@ public:
void ReadAsyncEvpp(cMicroservice_RequestContext *pc_reqCtx) { void ReadAsyncEvpp(cMicroservice_RequestContext *pc_reqCtx) {
std::string body = "This is expected to be sent back as part of response body."; std::string body = "This is expected to be sent back as part of response body.";
auto p_msClient = ClientFactory::createEvppCommandImpl("evpp-test"); //auto p_msClient = ClientFactory::createEvppCommandImpl("evpp-test");
std::map<std::string,std::string> headers; std::map<std::string,std::string> headers;
headers["Content-Type"] = "application/json"; headers["Content-Type"] = "application/json";
//std::string uri = "http://echo.jpillora.com"; //std::string uri = "http://echo.jpillora.com";
...@@ -134,7 +134,7 @@ public: ...@@ -134,7 +134,7 @@ public:
.WithContent(body); .WithContent(body);
msCmndParams.WithParamsString("post"); msCmndParams.WithParamsString("post");
p_msClient->AsyncCreate(&msCmndParams, [clientAsyncTaskParamsPtr](cMicroservice_BaseRestResponse* p_baseRestResponse){ p_rest_client_->AsyncCreate(&msCmndParams, [clientAsyncTaskParamsPtr](cMicroservice_BaseRestResponse* p_baseRestResponse){
if(p_baseRestResponse->IsSuccess()){ if(p_baseRestResponse->IsSuccess()){
clientAsyncTaskParamsPtr->p_IContainer_->WriteObjectToResponse( clientAsyncTaskParamsPtr->p_IContainer_->WriteObjectToResponse(
...@@ -413,8 +413,9 @@ int main(int argc, char *argv[]) ...@@ -413,8 +413,9 @@ int main(int argc, char *argv[])
.withMetrics() .withMetrics()
.withMonitoring() // need to add reload .withMonitoring() // need to add reload
.withPubSub(NULL) .withPubSub(NULL)
.withServiceDiscovery(NULL) .withServiceDiscovery(NULL) //auto p_msClient = ClientFactory::createEvppCommandImpl("evpp-test");
.addClient(ClientFactory::createEvppCommandImpl("other-service", "localhost", 32010, true, 10, false,"localhost:6379")) .addClient(ClientFactory::createEvppCommandImpl("other-service"))
//.addClient(ClientFactory::createEvppCommandImpl("other-service", "localhost", 32010, true, 10, false,"localhost:6379"))
// .addClient(ClientFactory::createHttpImplMsClient("other-service", "localhost", 32010, true, 10, false,"localhost:6379")) // .addClient(ClientFactory::createHttpImplMsClient("other-service", "localhost", 32010, true, 10, false,"localhost:6379"))
.addClient(ClientFactory::createZmqMsgQImp("zmq-service", msApp.name(), 0, .addClient(ClientFactory::createZmqMsgQImp("zmq-service", msApp.name(), 0,
Microservice_ZMQServerParams::eProtocol::eIpc)) Microservice_ZMQServerParams::eProtocol::eIpc))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment