Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery.common.cpp
/
Microservice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9fd2e4df
authored
Jun 26, 2018
by
Amir Aharon
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
using client from init
parent
8468cd1b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
test/Microservice_Test.cpp
test/Microservice_Test.cpp
View file @
9fd2e4df
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment