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
7541b6f9
authored
Apr 04, 2017
by
amir
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
change mongoose to civetweb in serverfactory
parent
c72447f4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
src/utils/CommonUtils.h
src/utils/ServerFactory.cpp
src/utils/ServerFactory.h
test/Microservice_Test.cpp
src/utils/CommonUtils.h
View file @
7541b6f9
...
...
@@ -8,6 +8,8 @@
#include <chrono>
#include <utility>
#include <string.h>
#include <unistd.h>
/**
* common utils
...
...
src/utils/ServerFactory.cpp
View file @
7541b6f9
...
...
@@ -8,7 +8,7 @@
#include <impl/servers/Microservice_IRestServerRMQImpl.h>
cMicroservice_IRestServerCivetWebImpl
*
ServerFactory
::
createIRestServer
Mongoose
Impl
(
std
::
string
host
,
int
port
,
int
workerThreadsNum
)
{
ServerFactory
::
createIRestServer
CivetWeb
Impl
(
std
::
string
host
,
int
port
,
int
workerThreadsNum
)
{
return
new
cMicroservice_IRestServerCivetWebImpl
(
new
cMicroservice_RestServerParams
(
port
,
host
,
workerThreadsNum
));
}
...
...
src/utils/ServerFactory.h
View file @
7541b6f9
...
...
@@ -18,7 +18,7 @@ class cMicroservice_IRestServerRMQImpl;
class
ServerFactory
{
public
:
static
cMicroservice_IRestServerCivetWebImpl
*
createIRestServer
Mongoose
Impl
(
std
::
string
host
,
static
cMicroservice_IRestServerCivetWebImpl
*
createIRestServer
CivetWeb
Impl
(
std
::
string
host
,
int
port
,
int
workerThreadsNum
);
static
Microservice_IMsgQueueServerZmqImpl
*
createIMsgQueueServerZmqImpl
(
std
::
string
host
,
...
...
test/Microservice_Test.cpp
View file @
7541b6f9
...
...
@@ -302,7 +302,7 @@ void runNewMS(){
.
addClient
(
ClientFactory
::
createHttpImplMsClient
(
"other-service"
,
"localhost"
,
32010
,
true
,
10
,
false
,
"localhost:6379"
))
//new cMicroservice_Client(new MSICommandClientHttpImpl(),&clientParams))
.
addClient
(
ClientFactory
::
createZmqMsgQImp
(
"zmq-service"
,
msApp
.
name
(),
0
,
Microservice_ZMQServerParams
::
eProtocol
::
eIpc
))
.
addServer
(
ServerFactory
::
createIRestServer
Mongoose
Impl
(
""
,
50010
,
1
))
// .addRestServer(new cMicroservice_IRestServerCivetWebImpl(new cMicroservice_RestServerParams(50010,"",1)))
.
addServer
(
ServerFactory
::
createIRestServer
CivetWeb
Impl
(
""
,
50010
,
1
))
// .addRestServer(new cMicroservice_IRestServerCivetWebImpl(new cMicroservice_RestServerParams(50010,"",1)))
.
addServer
(
ServerFactory
::
createIMsgQueueServerZmqImpl
(
msApp
.
name
(),
0
,
Microservice_ZMQServerParams
::
eProtocol
::
eIpc
))
.
addHandler
(
"/xxx"
,(
cMicroservice_BaseHandler
*
)
new
cMicroserviceHandler
(
"hello"
))
.
addHandler
(
"/zmq"
,
new
MSMsgQHandler
())
...
...
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