For this workshop, you will need the following tools:
You can install both of them using the following commands respectively:
# Will download go binaries
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz
# Will extract and move binaries into GOPATH
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
Then, open your .zshrc
or .bashrc
file and append the following line at the end:
export PATH=$PATH:/usr/local/go/bin:$(go env GOPATH)/bin
protoc is the protocol buffer compiler, you can install it with your package manager:
- under fedora:
sudo dnf install protobuf-compiler
- under ubuntu:
sudo apt install protobuf-compiler
or by following the instructions given here.
Create a folder for this workshop and run the following command inside to initialize the go project:
go mod init grpc-poc
Then run:
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]