pool

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(c Conn)

func CloseAndDelete

func CloseAndDelete(key string)

func LoadAllConn

func LoadAllConn() chan Conn

Types

type Conn

type Conn interface {
	Key() string           // connection unique key in pool
	Close() error          // close the connection
	Done() <-chan struct{} // check if ctx is canceled
	Err() error            // return error if conn has any internal error
}

func Get

func Get(key string) Conn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL