Versions in this module Expand all Collapse all v2 v2.7.1 Jan 15, 2024 v2.7.0 Jan 12, 2024 Changes in this version + func CloseAll() + func OnAfterSessionBind(f func(ctx context.Context, s Session) error) + func OnSessionBind(f func(ctx context.Context, s Session) error) + func OnSessionClose(f func(s Session)) + type HandshakeClientData struct + BuildNumber string + LibVersion string + Platform string + Version string + type HandshakeData struct + Sys HandshakeClientData + User map[string]interface{} + type ReqInFlight struct + type Session interface + Bind func(ctx context.Context, uid string) error + Clear func() + Close func() + Float32 func(key string) float32 + Float64 func(key string) float64 + Get func(key string) interface{} + GetData func() map[string]interface{} + GetDataEncoded func() []byte + GetHandshakeData func() *HandshakeData + GetHandshakeValidators func() map[string]func(data *HandshakeData) error + GetIsFrontend func() bool + GetOnCloseCallbacks func() []func() + GetRequestsInFlight func() ReqInFlight + GetSubscriptions func() []*nats.Subscription + HasKey func(key string) bool + HasRequestsInFlight func() bool + ID func() int64 + Int func(key string) int + Int16 func(key string) int16 + Int32 func(key string) int32 + Int64 func(key string) int64 + Int8 func(key string) int8 + Kick func(ctx context.Context) error + OnClose func(c func()) error + Push func(route string, v interface{}) error + PushToFront func(ctx context.Context) error + RemoteAddr func() net.Addr + Remove func(key string) error + ResponseMID func(ctx context.Context, mid uint, v interface{}, err ...bool) error + ResponseRoute func(ctx context.Context, mid uint, route string, v interface{}, err ...bool) error + Set func(key string, value interface{}) error + SetData func(data map[string]interface{}) error + SetDataEncoded func(encodedData []byte) error + SetFrontendData func(frontendID string, frontendSessionID int64) + SetHandshakeData func(data *HandshakeData) + SetIsFrontend func(isFrontend bool) + SetOnCloseCallbacks func(callbacks []func()) + SetRequestInFlight func(reqID string, reqData string, inFlight bool) + SetSubscriptions func(subscriptions []*nats.Subscription) + String func(key string) string + UID func() string + Uint func(key string) uint + Uint16 func(key string) uint16 + Uint32 func(key string) uint32 + Uint64 func(key string) uint64 + Uint8 func(key string) uint8 + ValidateHandshake func(data *HandshakeData) error + Value func(key string) interface{} + func GetSessionByID(id int64) Session + func GetSessionByUID(uid string) Session + type SessionPool interface + AddHandshakeValidator func(name string, f func(data *HandshakeData) error) + CloseAll func() + GetSessionByID func(id int64) Session + GetSessionByUID func(uid string) Session + GetSessionCloseCallbacks func() []func(s Session) + GetSessionCount func() int64 + NewSession func(entity networkentity.NetworkEntity, frontend bool, UID ...string) Session + OnAfterSessionBind func(f func(ctx context.Context, s Session) error) + OnSessionBind func(f func(ctx context.Context, s Session) error) + OnSessionClose func(f func(s Session)) + var DefaultSessionPool SessionPool + func NewSessionPool() SessionPool