Git Product home page Git Product logo

gopush-cluster-cli's Introduction

gopush-cluster-cli

gopush-cluster client for golang.

命令

##帮助

$ ./gopush-cluster-cli -h
$ ./gopush-cluster-cli h
$ ./gopush-cluster-cli -help
$ ./gopush-cluster-cli --help

##主命令帮助

$ ./gopush-cluster-cli admin -h
$ ./gopush-cluster-cli clicmd -h
$ ./gopush-cluster-cli cli -h

##子命令帮助

$ ./gopush-cluster-cli admin pspm -h
$ ./gopush-cluster-cli admin pmpm -h
...
$ ./gopush-cluster-cli clicmd gn -h
...

Example

##客户端获取订阅节点

//获取节点,URL为代码中的URL key:seven 协议:2(Tcp)
$./gopush-cluster-cli clicmd gn -key seven -p 2 
$./gopush-cluster-cli clicmd gn -url http://192.168.2.168:8090/1/server/get -key seven -p 2

##客户端获取离线消息

//URL为代码中的URL key:seven 最新接收的私有消息ID:1
$./gopush-cluster-cli clicmd gom -key seven -mid 1 
$./gopush-cluster-cli clicmd gom -url http://192.168.2.168:8090/1/msg/get -key seven -mid 1

##客户端获取初始化消息ID

$./gopush-cluster-cli clicmd gmi 
$./gopush-cluster-cli clicmd gmi -url http://192.168.2.168:8090/1/time/get

##管理员推送单个信息

$./gopush-cluster-cli admin pspm -key seven -expire 600 -msg {\"test\":1}
$./gopush-cluster-cli admin pspm -url http://192.168.2.168:8091/1/admin/push/private -key seven -expire 600 -msg {\"test\":1}

##管理员给多个key推送同一条消息信息

$./gopush-cluster-cli admin pmpm -expire 600 -msg "{\"m\":\"{\\\"test\\\":1}\",\"k\":\"seven,testkey1,testkey2\"}"
$./gopush-cluster-cli admin pmpm -url http://192.168.2.168:8091/1/admin/push/mprivate -expire 600 -msg "{\"m\":\"{\\\"test\\\":1}\",\"k\":\"seven,testkey1,testkey2\"}"

##启动客户端

$./gopush-cluster-cli cli -addr 192.168.2.168:6969 -key seven -heartbeat 30
$./gopush-cluster-cli startclient -key seven -heartbeat 30
$./gopush-cluster-cli cli 
$./gopush-cluster-cli startclient

gopush-cluster-cli's People

Contributors

xaseven avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.