stancli

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 11 Imported by: 0

README

stancli

About

Command line client for STAN messaging.

Usage

Publishing message

Run following command in terminal, but with required STAN subject instead of some.subject

./stancli pub some.subject

after that type or paste your message body. Finally, to publish message hit Enter/Return and then Ctrl-D.

Subscribing subject
./stancli sub some.subject

Configuration

To connect to Nats MQ, you need to specify configuration. Configuration file contains following structure in JSON format:

{
  "url": "nats://0.0.0.0:4222",
  "cluster_id": "test-cluster"
}

There is an example of a configuration file in repository.

You can specify path to configuration file using -config flag. For expample:

./stancli sub some.subject -config ./custom-config.json

By default, path to configuration file is ./config.json, so you can omit flag if you use a file named config.json located next to executable of stancli.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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