pitaya-cli

command module
v0.0.0-...-7a06de9 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 15 Imported by: 0

README

pitaya-cli

A REPL cli client made in go for pitaya.

Installing

go get -u github.com/topfreegames/pitaya-cli

Usage

For cli flags, run pitaya-cli --help

$ pitaya-cli

Pitaya REPL Client
>>> help

Commands:
  clear             clear the screen
  connect           connects to pitaya
  disconnect        disconnects from pitaya server
  exit              exit the program
  help              display help
  notify            makes a notify to pitaya server
  push              insert information of push return
  request           makes a request to pitaya server
  sethandshake      sets a handshake parameter

For connecting to a protobuffer server specify the documentation route with the -docs argument:

pitaya-cli -docs connector.docsHandler.docs

Protobuffer servers must implement handlers for protobuf descriptors and auto documentation.

A full example of running pitaya-cli with protobuffers:

pitaya-cli -docs connector.docsHandler.docs
>>> push connector.playerHandler.matchfound protos.FindMatchPush
>>> connect localhost:30124
>>> request connector.playerHandler.create
>>> request connector.playerHandler.findmatch {"RoomType":"xxxx"}

This example can be run with the pitaya-bot protobuffer testing example.

Set handshake parameters

You can edit some handshake parameters before connecting to the server. The parameters are:

Pitaya REPL Client
>>> sethandshake platform ios
>>> sethandshake buildNumber 999
>>> sethandshake version 1.0.6
Read commands from file

It's possible to add a list of sequential requests into a file and pitaya-cli will execute them in order.

For example: commands.txt

connect localhost:3250
request connector.playerHandler.create
request connector.playerHandler.findmatch {"RoomType":"xxxx"}

Then run: pitaya-cli --filename commands.txt

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