NewManager creates a new streaming credentials manager. Parameters: - pl: The connection pool to manage - reAuthTimeout: Maximum time to wait for acquiring a connection for re-authentication The manager creates a ReAuthPoolHook sized to match the pool size, ensuring that re-auth operations don't e
(pl pool.Pooler, reAuthTimeout time.Duration)
| 43 | // The manager creates a ReAuthPoolHook sized to match the pool size, ensuring that |
| 44 | // re-auth operations don't exhaust the connection pool. |
| 45 | func NewManager(pl pool.Pooler, reAuthTimeout time.Duration) *Manager { |
| 46 | m := &Manager{ |
| 47 | pool: pl, |
| 48 | poolHookRef: NewReAuthPoolHook(pl.Size(), reAuthTimeout), |
| 49 | credentialsListeners: NewCredentialsListeners(), |
| 50 | } |
| 51 | m.poolHookRef.manager = m |
| 52 | return m |
| 53 | } |
| 54 | |
| 55 | // PoolHook returns the pool hook for re-authentication. |
| 56 | // |