rpc

command
Version: v0.0.0-...-ba49760 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

README

RPC API Example

This is an example of using an RPC based API when the api handler is set with --handler=rpc

Getting Started

Run the Micro API
$ micro api --handler=rpc
Run the Greeter Service
$ go run greeter/server/main.go

### Run the Greeter API

$ go run rpc.go
Listening on [::]:64738
Curl the API

Test the index

curl -H 'Content-Type: application/json' -d '{"name": "Asim"}' http://localhost:8080/greeter/hello
{
  "msg": "Hello Asim"
}

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
proto
hello
Package go_micro_api_greeter is a generated protocol buffer package.
Package go_micro_api_greeter is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL