centcli

command module
v0.0.0-...-1549af1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Centcli

Terminal client for the Centrifugo websockets server.

Configuration

Create a config.json with your Centrifugo nodes. This file should be located in the same directory as the binary or in a ~/.centcli directory:

{
 "nodes": [
  {
   "name": "local",
   "addr":"localhost:8001",
   "secret":"secret_key"
  },
  {
   "name": "local2",
   "addr":"localhost:8002",
   "secret":"secret_key"
  }
 ]
}

Available commands

Initialization

Server to use (must be set in config): start the program with the flag -s=server_name will initialize a connection

USE: use server_name

Server actually in use:

USING: using

To set the client's Centrifugo username use the flag -u=clientusername.

Statistics

Get stats about Centrifugo:

STATS: options:

  • stats all
  • stats node
  • stats client
  • stats http

Get a particular statistic:

STAT: stat node_num_channels

All the Centrifugo statistics are available: check the complete list

Actions

PUBLISH: `publish channel_name {"foo":"bar"}

Note: do not use spaces in your payload

LISTEN: listen channel_name

STOP: stop listen channel_name

Channels

COUNT: count chans

Get all channels on server:

CHANS: chans

List of users in a channel:

PRESENCE: presence channel_name

Channel history:

HISTORY: history channel_name

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
libcentcli
cmd

Jump to

Keyboard shortcuts

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