| | |
| | | } |
| | | |
| | | func NewMicroNode(ctx context.Context,q chan os.Signal, serverId string, reg *RegisterInfo, fnLog func(v ...interface{})) (*MicroNode, error){ |
| | | conf := NewConfig(KEY_REGISTER,512,5,1000,100,1000, fnLog) |
| | | conf := NewConfig(KEY_REGISTER,512,5,1000,1000,1000, fnLog) |
| | | handle, err := Register(ctx, q, conf, reg) |
| | | if err != nil { |
| | | return nil, err |
| | |
| | | //收到其它进程的请求消息 |
| | | go ms.serve(msgR, keyR) |
| | | } |
| | | |
| | | time.Sleep(50 * time.Millisecond) |
| | | } |
| | | } |
| | | } |
| | |
| | | Msg: err.Error(), |
| | | } |
| | | } else { |
| | | ms.printLog("reqBody Path:", reqBody.Path, " contentType:", reqBody.ContentType, " formMap:",reqBody.FormMap, " postFormMap:", reqBody.PostFormMap, "to key: ", p) |
| | | ms.printLog("srcProc:", msgR.SrcProc,"reqBody Path:", reqBody.Path, " contentType:", reqBody.ContentType, " formMap:",reqBody.FormMap, " postFormMap:", reqBody.PostFormMap, "to key: ", p) |
| | | |
| | | if f,ok := ms.handlers[reqBody.Path];ok { |
| | | reqBody.SrcProc = msgR.SrcProc |