Categorygithub.com/segmentio/rpc-cli
repository
1.0.3
Repository: https://github.com/segmentio/rpc-cli.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

rpc(1) ⋅ a simple RPC CLI.

Features

  • Interactive mode
  • Consumes input from stdin
  • Nice UX (rpc :3000 sum [2,2])
  • HTTP / TCP (rpc http://localhost:3000)

Installation

$ go get github.com/segmentio/rpc-cli/cmd/rpc

Codecs

  • jsonrpc

Usage

$ rpc :3000
:3000> Service.Echo foo=baz
{
  foo: "baz"
}
:3000> Service.Sum [2,2]
4
$ echo '{"name":"{{ name }}"}' | phony | rpc :3000 Service.Echo
{
  "name": "Dyan Patterson"
}
....
$ rpc :3000 Service.Echo foo=baz
{
  "foo": "baz"
}
$ rpc :3000 Service.Sum [2,2]
4

License

MIT