Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { net.Conn stmt.StatementManager }
Conn represents a connection interface.
func NewConnWith ¶ added in v1.3.0
NewConn returns a new connection instance.
type ConnManager ¶
type ConnManager interface { // AddConn adds the specified connection. AddConn(c Conn) error // UpdateConn updates the specified connection. UpdateConn(from Conn, to Conn) error // Conns returns the included connections. Conns() []Conn // LookupConnByUID returns a connection and true when the specified connection exists by the connection ID, otherwise nil and false. LookupConnByUID(cid uint64) (Conn, bool) // LookupConnByUUID returns the connection with the specified UUID. LookupConnByUUID(uuid uuid.UUID) (Conn, bool) // RemoveConn deletes the specified connection from the map. RemoveConn(conn Conn) error // RemoveConnByUID deletes the specified connection by the connection ID. RemoveConnByUID(cid uint64) // RemoveConnByUID deletes the specified connection by the connection ID. RemoveConnByUUID(uuid uuid.UUID) // Start starts the connection manager. Start() error // Close closes the connection manager. Close() error // Stop closes all connections. Stop() error }
ConnManager represents a connection map.
func NewConnManager ¶
func NewConnManager() ConnManager
NewConnManager returns a new connection manager instance.
Click to show internal directories.
Click to hide internal directories.