| | |
| | | } |
| | | |
| | | 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,3000,3000,3000, fnLog) |
| | | conf := NewConfig(KEY_REGISTER,512,5,5000,5000,2000, fnLog) |
| | | handle, err := Register(ctx, q, conf, reg) |
| | | if err != nil { |
| | | return nil, err |
| | |
| | | if f,ok := ms.handlers[reqBody.Path];ok { |
| | | reqBody.SrcProc = msgR.SrcProc |
| | | ri = f(&reqBody) |
| | | ms.printLog("call funcMap f,reply:", *ri) |
| | | ms.printLog("call funcMap f,reply.Success:", ri.Success) |
| | | } else { |
| | | ms.printLog("ms.funcMap not eixst path: ", reqBody.Path) |
| | | ri = &Reply{ |