mirror of
https://github.com/telanflow/mps.git
synced 2025-09-26 20:41:25 +08:00
16 lines
290 B
Go
16 lines
290 B
Go
package pool
|
|
|
|
import "net"
|
|
|
|
// ConnContainer connection pool interface
|
|
type ConnContainer interface {
|
|
// Get returned a idle net.Conn
|
|
Get(addr string) (net.Conn, error)
|
|
|
|
// Put place a idle net.Conn into the pool
|
|
Put(conn net.Conn) error
|
|
|
|
// Release connection pool
|
|
Release() error
|
|
}
|