nats-streaming-cli

command module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: MIT Imports: 1 Imported by: 0

README

Nats-streaming Cli

An interactive command line tool for nats-streaming server

Make it easy to monitor and publish message to a nats-streaming server in development

For security reasons ,it's not recommend to use this cli in production!

Support linux and macOS (windows may work, not sure)

Installation

Build from source
  1. Clone this repo
  2. cd to repo path
  3. Run ./build
  4. Put nats-streaming-cli in pkg dir to your $PATH
Docker

If you prefer to use docker:

  1. Clone this repo
  2. cd to repo path
  3. Run docker build -t nats-streaming-cli .

Usage

nats-streaming-cli [options]
Options:
      -h   --host <string>           set nats-streaming server host (default: localhost)
      -p   --port <int>              set nats-streaming server port (default: 4222)
      -m   --http_port <int>         set http monitoring port (default: 8222)
      -cid --cluster_id <string>     set the server cluster ID, if not set, we will try to get cluster id from server monitor endpoint
           --client_id  <string>     specific client id cli use ,if not set, we will use a random client id
      -v   --version                 show version

Notice: cluster id can be get from nats-streaming server's monitor http server

If the monitor http server is disabled ,you should supply the cluster id

Commands

show
  ├─ channel CHANNEL                show a specific channel info
  ├─ channels                       show all channel info
  ├─ server                         show server info
  ├─ store                          show store info
  └─ clients                        show clients info

pub CHANNEL MESSAGE                 publish MESSAGE to CHANNEL

list CHANNEL [START [LIMIT]]        list LIMIT(unlimit if not specific) messages in CHANNEL start at START (0 if not specific)

help                                print this help message

exit                                exit

Notice: show commands rely on the monitor http server

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package metadata param in this package can be set by -ldflags when building
Package metadata param in this package can be set by -ldflags when building

Jump to

Keyboard shortcuts

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