Commands¶
hop-client provides a command line interface for various tasks:
hop configure
: Authentication utilitieshop publish
: Publish messages such as GCN circulars and noticeshop subscribe
: Listen to messages such as GCN circulars and noticeshop version
: Show version dependencies ofhop-client
hop configure
¶
This command allows a user to handle auth-based configuration.
usage: hop configure [-h] <command> ...
Configuration utilities.
optional arguments:
-h, --help show this help message and exit
commands:
locate display configuration path
setup set up configuration
hop publish
¶
This command allows a user to publish various structured and unstructured messages, including:
An XML formatted GCN/VOEvent notice
Unstructured messages such as byte-encoded or JSON-serializable data.
Structured messages such as GCN circulars and VOEvents are published as JSON-formatted text.
usage: hop publish [-h] [--no-auth] [-f {VOEVENT,CIRCULAR,BLOB}]
URL [MESSAGE [MESSAGE ...]]
Publish messages.
positional arguments:
URL Sets the URL (kafka://host[:port]/topic) to publish
messages to.
MESSAGE Messages to publish.
optional arguments:
-h, --help show this help message and exit
--no-auth If set, disable authentication.
-f {VOEVENT,CIRCULAR,BLOB}, --format {VOEVENT,CIRCULAR,BLOB}
Specify the message format. Defaults to BLOB for an
unstructured message.
hop subscribe
¶
This command allows a user to subscribe to messages and print them to stdout.
usage: hop subscribe [-h] [--no-auth] [-s {EARLIEST,LATEST}] [-p] [-j] URL
Subscribe to messages.
positional arguments:
URL Sets the URL (kafka://host[:port]/topic) to publish
messages to.
optional arguments:
-h, --help show this help message and exit
--no-auth If set, disable authentication.
-s {EARLIEST,LATEST}, --start-at {EARLIEST,LATEST}
Set the message offset offset to start at. Default:
LATEST.
-p, --persist If set, persist or listen to messages indefinitely.
Otherwise, will stop listening when EOS is received.
-j, --json Request message output as raw json
hop version
¶
This command prints all the versions of the dependencies
usage: hop version [-h]
List all the dependencies' versions.
optional arguments:
-h, --help show this help message and exit