netstat -lntp
-l, --listening
Show only listening sockets. (These are omitted by default.)
--numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user names.
-p, --program
Show the PID and name of the program to which each socket belongs.
[--tcp|-t] [--udp|-u] [--raw|-w]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
// Python版本重构 | |
// 定义了一个连接结构体 | |
type ESConnection struct { | |
mux sync.RWMutex | |
Client *http.Client | |
Host string | |
Auth bool | |
Aws AwsAuth | |
} |