refactor(rpc): 重构 RPC 客户端并优化日志记录
- 在 rpc 包中添加了 g.Log() 调用,用于记录 RPC 服务器启动和错误信息 - 重构了 controller 包,将 LogicClient 从 Controller 结构体中分离出来 - 优化了 login 控制器中的 Login 方法,增加了新客户端的创建和数据发送逻辑 - 简化了 systemtime 控制器中的 SystemTimeInfo 方法 - 更新了 server.go 中的 Start 函数,使用 new(controller.LogicClient) 替代 controller.Maincontroller
This commit is contained in:
17
logic/service/SystemTime/TimeErr.go
Normal file
17
logic/service/SystemTime/TimeErr.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package SystemTime
|
||||
|
||||
import "blazing/common/socket/errorcode"
|
||||
|
||||
type TimeErr struct {
|
||||
}
|
||||
|
||||
func (h *TimeErr) Code() errorcode.ErrorCode {
|
||||
|
||||
return errorcode.ErrorCodes.ErrInvalidPassword
|
||||
|
||||
}
|
||||
func (h *TimeErr) Error() string {
|
||||
|
||||
return "登录失败"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user