Skip to content

Latest commit

 

History

History

echo-cluster

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

How to run this Demo

Init GoPlay Framework

go get github.com/jennal/goplay

Server

Before you run this server, you need to get master server and connector server started.

Start master server

go install github.com/jennal/goplay-master
$GOPATH/bin/goplay-master

Start connector server

go install github.com/jennal/goplay-connector
$GOPATH/bin/goplay-connector

Start echo-cluster server

go run echo-cluster/server/main.go

Client

go run echo-cluster/client/main.go

Now every line you input to terminal will notify & request to server, and server will push & response back the same line.

You may notice that all the code in echo/client/main.go and echo-cluster/client/main.go are almost same. The only different is the port client connected. echo/client/main.go connect to echo server directly, and echo-cluster/client/main.go connect to connector server instead.