change tcp to unix socket
This commit is contained in:
parent
c48d821994
commit
036a6dfe8f
4
main.go
4
main.go
|
@ -38,7 +38,7 @@ var (
|
|||
key = kingpin.Flag("key", "Path to the client's TLS Certificate Private Key").ExistingFile()
|
||||
insecure = kingpin.Flag("insecure", "Controls whether a client verifies the server's certificate chain and host name").Short('k').Bool()
|
||||
|
||||
chartsListenAddr = kingpin.Flag("listen", "Listen addr to serve Web UI").Default(":18888").String()
|
||||
chartsListenAddr = kingpin.Flag("listen", "Listen addr to serve Web UI").Default("test.sock").String()
|
||||
timeout = kingpin.Flag("timeout", "Timeout for each http request").PlaceHolder("DURATION").Duration()
|
||||
dialTimeout = kingpin.Flag("dial-timeout", "Timeout for dial addr").PlaceHolder("DURATION").Duration()
|
||||
reqWriteTimeout = kingpin.Flag("req-timeout", "Timeout for full request writing").PlaceHolder("DURATION").Duration()
|
||||
|
@ -269,7 +269,7 @@ func main() {
|
|||
// charts listener
|
||||
var ln net.Listener
|
||||
if *chartsListenAddr != "" {
|
||||
ln, err = net.Listen("tcp", *chartsListenAddr)
|
||||
ln, err = net.Listen("unix", *chartsListenAddr)
|
||||
if err != nil {
|
||||
errAndExit(err.Error())
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue