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

Method IsInited

internal/pool/conn.go:309–313  ·  view source on GitHub ↗

IsInited returns true if the connection has been initialized. This is a backward-compatible wrapper around the state machine.

()

Source from the content-addressed store, hash-verified

307// IsInited returns true if the connection has been initialized.
308// This is a backward-compatible wrapper around the state machine.
309func (cn *Conn) IsInited() bool {
310 state := cn.stateMachine.GetState()
311 // Connection is initialized if it's in IDLE or any post-initialization state
312 return state != StateCreated && state != StateInitializing && state != StateClosed
313}
314
315// Used - State machine based implementation
316

Callers 1

_getConnMethod · 0.80

Calls 1

GetStateMethod · 0.45

Tested by

no test coverage detected