golang-rpc-example

command module
v0.0.0-...-c2f40a1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 6 Imported by: 0

README

Golang RPC Example

🥑 Please star or fork this repository if you like it 👀

This is an example of how to setup/use golang's built-in RPC. This example contains a client, scheduler (for primitive load balancing) and two servers, which are contacted by only the scheduler via RPC.

How to run

To run the full example you will need to run 4 processes: client, scheduler and 2 servers. You can start all four processes by running following commands separately (in separate terminal windows) in order as they are presented below:

go run main.go -s1 -p 4001
go run main.go -s2 -p 4002
go run main.go -scheduler
go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL