Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PacketConnPool ¶
type PacketConnPool struct {
// contains filtered or unexported fields
}
PacketConnPool caches multiple packet connections in a least-recently-used cache. In addition any connection added to the pool is also being read for incoming packets.
func NewPacketConnPool ¶
func NewPacketConnPool( packetCh chan<- *memberlist.Packet, reg prometheus.Registerer, log *log.Logger, localAddr string, ) *PacketConnPool
NewPacketConnPool instantiates a new packet connection pool.
func (*PacketConnPool) AddAndRead ¶
AddAndRead adds a connection to the pool and start reading for incoming packages.
func (*PacketConnPool) Get ¶
func (p *PacketConnPool) Get(addr string) (net.Conn, bool)
Get returns a connection to the given address or returns false.
func (*PacketConnPool) Shutdown ¶
func (p *PacketConnPool) Shutdown()
Shutdown closes and removes all connections from the pool.
Click to show internal directories.
Click to hide internal directories.