mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-18 23:53:44 -08:00
improve command xmpp-check
This commit is contained in:
committed by
Mickaël Rémond
parent
e05f36c69f
commit
323de704f6
@@ -12,18 +12,37 @@ $ go get -u gosrc.io/xmpp/cmd/xmpp-check
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
$ xmpp-check --help
|
||||
Usage:
|
||||
xmpp-check <host[:port]> [flags]
|
||||
|
||||
Examples:
|
||||
xmpp-check chat.sum7.eu:5222 --domain meckerspace.de
|
||||
|
||||
Flags:
|
||||
-d, --domain string domain if host handle multiple domains
|
||||
-h, --help help for xmpp-check
|
||||
```
|
||||
|
||||
If you server is on standard port and XMPP domains matches the hostname you can simply use:
|
||||
|
||||
```
|
||||
$ xmpp-check myhost.net
|
||||
2019/05/16 16:04:36 All checks passed
|
||||
$ xmpp-check chat.sum7.eu
|
||||
info All checks passed
|
||||
⇢ address="chat.sum7.eu" domain=""
|
||||
⇢ main.go:43 main.runCheck
|
||||
⇢ 2019-07-16T22:01:39.765+02:00
|
||||
```
|
||||
|
||||
You can also pass the port and the XMPP domain if different from the server hostname:
|
||||
|
||||
```
|
||||
$ xmpp-check myhost.net:5222 xmppdomain.net
|
||||
2019/05/16 16:05:21 All checks passed
|
||||
$ xmpp-check chat.sum7.eu:5222 --domain meckerspace.de
|
||||
info All checks passed
|
||||
⇢ address="chat.sum7.eu:5222" domain="meckerspace.de"
|
||||
⇢ main.go:43 main.runCheck
|
||||
⇢ 2019-07-16T22:01:33.270+02:00
|
||||
```
|
||||
|
||||
Error code will be non-zero in case of error. You can thus use it directly with your usual
|
||||
|
||||
Reference in New Issue
Block a user