examples for rpcx 3.0
Switch branches/tags
Nothing to show
Clone or download
Latest commit c314372 Nov 9, 2018
Permalink
Failed to load latest commit information.
101basic add compress example Apr 25, 2018
102basic add oneway example Mar 30, 2018
alias modify server.NewServer(...) Oct 30, 2017
auth modify server.NewServer(...) Oct 30, 2017
bidirectional add bidirectional example Jan 12, 2018
breaker add circuit breaker example Jun 8, 2018
broadcast add fork/broadcast examples Feb 5, 2018
codec add protobuf example Sep 29, 2018
compress add compress example Apr 25, 2018
failmode add reconnect example Nov 9, 2018
fork add fork/broadcast examples Feb 5, 2018
function add registering function example with etcd Oct 23, 2018
group add state & group examples Feb 2, 2018
heartbeat modify server.NewServer(...) Oct 30, 2017
http_invoke add state & group examples Feb 2, 2018
kcp modify server.NewServer(...) Oct 30, 2017
metadata modify server.NewServer(...) Oct 30, 2017
metrics add metrics example Jan 4, 2018
nil_panic modify server.NewServer(...) Oct 30, 2017
oneclient add oneclient example Mar 6, 2018
oneway improve oneway example Apr 12, 2018
plugin add plugin example Sep 12, 2018
quic modify server.NewServer(...) Oct 30, 2017
reconnect add reconnect example Nov 9, 2018
registry add dynamic port allocation example Sep 13, 2018
reuseport modify server.NewServer(...) Oct 30, 2017
selector correct geo issue Apr 2, 2018
state add state & group examples Feb 2, 2018
timeout modify server.NewServer(...) Oct 30, 2017
timeout2 add compress example Apr 25, 2018
timeout3 add ctx.Timeout example Aug 15, 2018
tls modify server.NewServer(...) Oct 30, 2017
trace add trace example Dec 26, 2017
unixdomain add unix domain example Nov 1, 2017
xgen add oneclient example Mar 6, 2018
LICENSE Initial commit Oct 20, 2017
README.md use double quotation marks for build tags Jan 26, 2018
service.go add compress example Apr 25, 2018

README.md

Examples for rpcx 3.0

A lot of examples for rpcx 3.0

How to run

you should build rpcx with necessary tags, otherwise only need to install rpcx:

go get -u -v github.com/smallnest/rpcx/...

if you want to use "zookeeper" registry, you need to add tag zookeeper,

go get -u -v -tags "zookeeper" github.com/smallnest/rpcx/...

Similarly, if you want to use etcd registry and quic network, you need to :

go get -u -v -tags "etcd quic" github.com/smallnest/rpcx/...

You can install all features of rpcx with those below tags:

go get -u -v -tags "zookeeper etcd consul ping quic kcp reuseport" github.com/smallnest/rpcx/...

If you install succeefullly, you can run examples in this repository.

Enter one sub directory in this repository, go run server.go in one terminal and cd client; go run client.go in another ternimal, and you can watch the run result.

For example,

cd 101basic
go run server.go

And

cd 101basic/client
go run client.go