mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-13 03:27:36 +08:00
增加协议头
This commit is contained in:
@@ -96,6 +96,7 @@ func (s *COriginNode) Start() {
|
|||||||
|
|
||||||
//停止运行程序
|
//停止运行程序
|
||||||
s.Stop()
|
s.Stop()
|
||||||
|
service.GetLogger().Printf(sysmodule.LEVER_INFO, "Node stop run...")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *COriginNode) Stop() {
|
func (s *COriginNode) Stop() {
|
||||||
@@ -113,6 +114,7 @@ func NewOrginNode() *COriginNode {
|
|||||||
//安装系统服务
|
//安装系统服务
|
||||||
syslogservice := &sysservice.LogService{}
|
syslogservice := &sysservice.LogService{}
|
||||||
syslogservice.InitLog("syslog", sysmodule.LEVER_INFO)
|
syslogservice.InitLog("syslog", sysmodule.LEVER_INFO)
|
||||||
|
|
||||||
service.InstanceServiceMgr().Setup(syslogservice)
|
service.InstanceServiceMgr().Setup(syslogservice)
|
||||||
|
|
||||||
//初始化集群对象
|
//初始化集群对象
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type HttpRequest struct {
|
type HttpRequest struct {
|
||||||
Body string
|
Header http.Header
|
||||||
|
Body string
|
||||||
}
|
}
|
||||||
|
|
||||||
type HttpRespone struct {
|
type HttpRespone struct {
|
||||||
@@ -111,7 +112,7 @@ func (slf *HttpServerService) httpHandler(w http.ResponseWriter, r *http.Request
|
|||||||
}
|
}
|
||||||
strCallPath := "_" + vstr[1] + ".HTTP_" + vstr[2]
|
strCallPath := "_" + vstr[1] + ".HTTP_" + vstr[2]
|
||||||
|
|
||||||
request := HttpRequest{string(msg)}
|
request := HttpRequest{r.Header, string(msg)}
|
||||||
var resp HttpRespone
|
var resp HttpRespone
|
||||||
|
|
||||||
cluster.InstanceClusterMgr().Call(strCallPath, &request, &resp)
|
cluster.InstanceClusterMgr().Call(strCallPath, &request, &resp)
|
||||||
|
|||||||
Reference in New Issue
Block a user