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

Method ExecuteInitConn

internal/pool/conn.go:647–652  ·  view source on GitHub ↗

ExecuteInitConn runs the stored connection initialization function if available.

(ctx context.Context)

Source from the content-addressed store, hash-verified

645
646// ExecuteInitConn runs the stored connection initialization function if available.
647func (cn *Conn) ExecuteInitConn(ctx context.Context) error {
648 if cn.initConnFunc != nil {
649 return cn.initConnFunc(ctx, cn)
650 }
651 return fmt.Errorf("redis: no initConnFunc set for conn[%d]", cn.GetID())
652}
653
654func (cn *Conn) SetNetConn(netConn net.Conn) {
655 // Store the new connection atomically first (lock-free)

Callers 1

SetNetConnAndInitConnMethod · 0.95

Calls 1

GetIDMethod · 0.95

Tested by

no test coverage detected