nats-cli

command module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

Command line interface for NATS Streaming

All versions have MacOS binaries only: If you want to use nats-cli on other systems, you should to build the binaries manually

Features

Templates
  • Publishing
  • Subscribing
  • Templates this is a useful tool for saving your NATS settings, and reuse them with other commands.

Usage

Usage:
  nats-cli [command]

Available Commands:
  help        Help about any command
  publish     Publish to subject
  subscribe   Subscribe to subject
  template    Manage templates

Flags:
      --config string   config file (default is $HOME/.nats-cli.yaml)
  -h, --help            help for nats-cli
  -t, --toggle          Help message for toggle

Use "nats-cli [command] --help" for more information about a command.

Subscribe example

nats-cli sub -a your-nats-server -c nats-cluster-id -s subject -d 24h

Publish example

nats-cli pub -a your-nats-server -c nats-cluster-id -s subject -m '{"json":"here"}'

Templates example

List
nats-cli template list
Create
nats-cli template create -a your-nats-server -c nats-cluster-id  -s subject -n template-name
Remove
nats-cli tpl remove -n template-name
Usage
nats-cli sub tpl -n your-template-name -d 2h
nats-cli pub tpl -n your-template-name -m '{"json":"here"}'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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