Documentation
¶
Index ¶
- Constants
- func NewWsCodec() *wsCodec
- func NewWsServer(cfg *dto.GatewayConfig, ce cache.Provider, tcpAddr string) gnet.EventHandler
- type Server
- func (w *Server) OnBoot(eng gnet.Engine) gnet.Action
- func (w *Server) OnClose(c gnet.Conn, err error) gnet.Action
- func (w *Server) OnOpen(c gnet.Conn) (out []byte, action gnet.Action)
- func (w *Server) OnShutdown(eng gnet.Engine)
- func (w *Server) OnTick() (delay time.Duration, action gnet.Action)
- func (w *Server) OnTraffic(c gnet.Conn) gnet.Action
- type User
- type UserClaims
Constants ¶
View Source
const ( EventAuth = "auth" EventPing = "ping" EventPong = "pong" )
View Source
const (
ServerSystem = "system"
)
Variables ¶
This section is empty.
Functions ¶
func NewWsCodec ¶
func NewWsCodec() *wsCodec
func NewWsServer ¶
func NewWsServer(cfg *dto.GatewayConfig, ce cache.Provider, tcpAddr string) gnet.EventHandler
Types ¶
type Server ¶
type Server struct {
gnet.BuiltinEventEngine
// contains filtered or unexported fields
}
func (*Server) OnShutdown ¶
type UserClaims ¶
type UserClaims struct {
User User
jwt.RegisteredClaims
}
Click to show internal directories.
Click to hide internal directories.