NewSessionPool returns a new session pool instance
()
| 205 | |
| 206 | // NewSessionPool returns a new session pool instance |
| 207 | func NewSessionPool() SessionPool { |
| 208 | return &sessionPoolImpl{ |
| 209 | sessionBindCallbacks: make([]func(ctx context.Context, s Session) error, 0), |
| 210 | afterBindCallbacks: make([]func(ctx context.Context, s Session) error, 0), |
| 211 | handshakeValidators: make(map[string]func(data *HandshakeData) error, 0), |
| 212 | SessionCloseCallbacks: make([]func(s Session), 0), |
| 213 | sessionIDSvc: newSessionIDService(), |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | func (pool *sessionPoolImpl) GetSessionCount() int64 { |
| 218 | return pool.SessionCount |