Documentation
¶
Index ¶
- Constants
- func EncodeClientID(clientID string, customer *dbschema.OfficialCustomer) string
- func MakeSSEHandler(msgGetter NSender) func(ctx echo.Context) error
- func MakeWSHandler(msgGetter NSender, msgSetter NReceiver) func(c *websocket.Conn, ctx echo.Context) error
- func MemoryNoticeSender(ctx echo.Context, customer *dbschema.OfficialCustomer) (func(), <-chan *notice.Message, error)
- func OnlineStatusDBUpdater(c echo.Context, customer *dbschema.OfficialCustomer) (func(), <-chan *notice.Message, error)
- func OnlineStatusQueueUpdater(c echo.Context, customer *dbschema.OfficialCustomer) (func(), <-chan *notice.Message, error)
- func RegisterCmder(startup ...bool)
- func RegisterRoute(r echo.RouteRegister, cfg echo.H)
- func ResetClientCount()
- func SendOnlineStatusToQueue(ctx context.Context, sessionId string, customerID uint64, online bool) error
- type CustomerOnline
- type NReceiver
- type NSender
Constants ¶
View Source
const Day = time.Hour * 24
View Source
const FMTDateTime = `20060102150405`
Variables ¶
This section is empty.
Functions ¶
func EncodeClientID ¶
func EncodeClientID(clientID string, customer *dbschema.OfficialCustomer) string
func MakeWSHandler ¶
func MemoryNoticeSender ¶
func OnlineStatusDBUpdater ¶
func RegisterCmder ¶
func RegisterCmder(startup ...bool)
./webx --config ./config/config.yaml --type queue:worker
func RegisterRoute ¶
func RegisterRoute(r echo.RouteRegister, cfg echo.H)
func ResetClientCount ¶
func ResetClientCount()
Types ¶
type CustomerOnline ¶
type CustomerOnline struct {
SessionID string `json:"sessID"`
CustomerID uint64 `json:"custID"`
Online bool `json:"online"`
}
func (*CustomerOnline) Apply ¶
func (c *CustomerOnline) Apply() error
Click to show internal directories.
Click to hide internal directories.