Documentation ¶
Index ¶
- Constants
- Variables
- func BuildEchoHandlerFunc(bi *BuildInf) echo.HandlerFunc
- func DecodeBaseResult(r *v10.Result, ret proto.Message) (err error)
- func Init(callback func(bi *BuildInf)) (ready bool)
- func RefreshUserHash(uid uint64, did string, token string)
- func RemoveUserHash(uid uint64, did string, token string)
- type BuildInf
- type FwdrFunc
- type Hooker
- type NotifiedUsers
- type PostFunctions
- func (s *PostFunctions) OnLoginOk(ret *v10.UserInfoToken)
- func (s *PostFunctions) OnLoginV11Ok(ret *v10.AuthReply)
- func (s *PostFunctions) OnRefreshTokenOk(ret *v10.UserInfoToken)
- func (s *PostFunctions) OnRefreshTokenV11Ok(ret *v10.AuthReply)
- func (s *PostFunctions) OnRegisterV11Ok(ret *v10.AuthReply)
- func (s *PostFunctions) OnX(ret proto.Message)
Constants ¶
View Source
const ( LoginMethod = "Login" RefreshTokenMethod = "RefreshToken" )
Variables ¶
View Source
var ( // allow 500 messages buffered in UsersNeedNotified queue. UsersNeedNotified = make(chan *NotifiedUsers, 500) )
Functions ¶
func BuildEchoHandlerFunc ¶
func BuildEchoHandlerFunc(bi *BuildInf) echo.HandlerFunc
service.BuildEchoHandlerFunc() 使用对照表建立 restful 路由。 客户端的 restful 请求通过这些路由,执行对应的后端接口,并将结果返回给客户端。 部分地实现了 grpc-restful 的通用转换。
向后端接口的调用,使用 scheduler.Invoke() 异步地进行。 异步调用被 scheduler 内部的负载均衡器按照配置指定的算法进行调度。
func RefreshUserHash ¶
func RemoveUserHash ¶
Types ¶
type BuildInf ¶
type NotifiedUsers ¶
type NotifiedUsers struct { ConversationId uint64 ConversationSection uint32 MsgId uint64 Users []uint64 TS int64 SortNum uint64 }
func MakeNotifiedUsers ¶
func MakeNotifiedUsers(rr *v10.SaveMessageResponse) (ret *NotifiedUsers)
MakeNotifiedUsers prepares a NotifiedUsers structure from storage.SaveMessageResponse{}
func MakeNotifiedUsersFromNotifyMessage ¶
func MakeNotifiedUsersFromNotifyMessage(uid uint64, nm *v10.NotifyMessage) (ret *NotifiedUsers)
func MakeNotifiedUsersFromTalkingPush ¶
func MakeNotifiedUsersFromTalkingPush(uid uint64, tp *v10.TalkingPush) (ret *NotifiedUsers)
type PostFunctions ¶
type PostFunctions struct{}
func PF ¶
func PF() *PostFunctions
func (*PostFunctions) OnLoginOk ¶
func (s *PostFunctions) OnLoginOk(ret *v10.UserInfoToken)
func (*PostFunctions) OnLoginV11Ok ¶
func (s *PostFunctions) OnLoginV11Ok(ret *v10.AuthReply)
func (*PostFunctions) OnRefreshTokenOk ¶
func (s *PostFunctions) OnRefreshTokenOk(ret *v10.UserInfoToken)
func (*PostFunctions) OnRefreshTokenV11Ok ¶
func (s *PostFunctions) OnRefreshTokenV11Ok(ret *v10.AuthReply)
func (*PostFunctions) OnRegisterV11Ok ¶
func (s *PostFunctions) OnRegisterV11Ok(ret *v10.AuthReply)
func (*PostFunctions) OnX ¶
func (s *PostFunctions) OnX(ret proto.Message)
Click to show internal directories.
Click to hide internal directories.