Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager aggregates the signals that decide whether the TiProxy instance is serving and whether it should keep accepting new connections. Each public method below evaluates its own condition independently, so reordering one signal never silently changes another consumer's behavior.
func NewManager ¶
NewManager creates a Manager.
- ready reports whether the namespace manager is ready (init phase when false).
- rejectCheck reports whether new connections should be rejected because of memory pressure, together with a human-readable reason.
func (*Manager) Healthy ¶
Healthy reports whether the instance is fully serving. Used by DebugHealth. It returns false (with a reason) during init, rejectConns, and graceful shutdown.
func (*Manager) PreClose ¶
func (m *Manager) PreClose()
PreClose marks the instance as gracefully shutting down. Idempotent; safe to call from PreClose paths.
func (*Manager) RejectConns ¶
RejectConns reports whether new connections should be rejected and returns a reason string. Used by the proxy server and the VIP manager. It returns true only on memory pressure; graceful shutdown does NOT reject here, because the proxy keeps accepting until its listeners are closed. The VIP release on graceful shutdown is handled by PreClose.