example-grpc-over-file

module
v0.0.0-...-522cc97 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0

README

example-grpc-over-file

Environment

Assume you have latest Go installed.

install protobuf-compiler. see official guide: https://grpc.io/docs/protoc-installation/

If you are on Debian like system

sudo apt-get update && sudo apt install -y protobuf-compiler
protoc --version  # Ensure compiler version is 3+

install Go plugins

go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2

make sure ${GOPATH}/bin is exported.

export PATH="$PATH:$(go env GOPATH)/bin"

If you update any of .proto file, run go generate

go generate ./...

Directories

Path Synopsis
api
cmd
internal

Jump to

Keyboard shortcuts

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