MCPcopy
hub / github.com/redis/go-redis / NewManager

Function NewManager

internal/auth/streaming/manager.go:45–53  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

43// The manager creates a ReAuthPoolHook sized to match the pool size, ensuring that
44// re-auth operations don't exhaust the connection pool.
45func 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//

Callers 3

NewClientFunction · 0.92

Calls 3

NewReAuthPoolHookFunction · 0.85
NewCredentialsListenersFunction · 0.85
SizeMethod · 0.65