examples of rpcx
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smallnest a9fe033091 #12 fix transfile example 4 months ago
101basic add compress example 1 year ago
102basic add oneway example 1 year ago
alias modify server.NewServer(...) 2 years ago
auth modify server.NewServer(...) 2 years ago
bidirectional add bidirectional example 1 year ago
breaker add circuit breaker example 1 year ago
broadcast add fork/broadcast examples 1 year ago
codec fix typo 7 months ago
compress add compress example 1 year ago
error add error case 6 months ago
failmode add reconnect example 1 year ago
file_download add download file examle 10 months ago
filetransfer #12 fix transfile example 4 months ago
fork add fork/broadcast examples 1 year ago
function add registering function example with etcd 1 year ago
group add state & group examples 1 year ago
heartbeat modify server.NewServer(...) 2 years ago
http_invoke add internal_error example 4 months ago
internal_error add internal_error example 4 months ago
jsonrpc2 add cors configuration example 7 months ago
kcp can config kcp sever side 6 months ago
metadata modify server.NewServer(...) 2 years ago
metrics add metrics example 1 year ago
nil_panic modify server.NewServer(...) 2 years ago
oneclient add oneclient example 1 year ago
oneway improve oneway example 1 year ago
opentracing add opentracing api example 9 months ago
plugin add plugin example 1 year ago
pool add pool example 7 months ago
quic add utp example 6 months ago
reconnect Update client.go 11 months ago
registry add OneClient example for consul 4 months ago
reuseport modify server.NewServer(...) 2 years ago
selector correct geo issue 1 year ago
state add state & group examples 1 year ago
timeout modify server.NewServer(...) 2 years ago
timeout2 add compress example 1 year ago
timeout3 add ctx.Timeout example 1 year ago
tls modify server.NewServer(...) 2 years ago
trace add trace example 1 year ago
unixdomain add unix domain example 2 years ago
utp add utp example 6 months ago
xgen add oneclient example 1 year ago
LICENSE Initial commit 2 years ago
README.md use double quotation marks for build tags 1 year ago
service.go add compress example 1 year ago

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