Skip to content

kiosanim/gomicro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of a Microservice with GRPC and Logging Feature

Author: Fábio Sartori

Install Protobuf

Linux

sudo apt-get install -y protobuf-compiler

MacOS

brew install protobuff

GRPC and Protobuffer Golang Dependencies

Protobuf Compiler

  • Linux - DEB
apt install -y protobuf-compiler
protoc --version  # Ensure compiler version is 3+
  • MacOS
brew install protobuf
protoc --version  # Ensure compiler version is 3+
  • Windows
> winget install protobuf
> protoc --version # Ensure compiler version is 3+

Go Libraries

go get -u google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/protobuf/cmd/protoc-gen-go

go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc

NOTE: You should add the protoc-gen-go-grpc to your PATH

PATH="${PATH}:${HOME}/go/bin"

Generate ProtoBuf

Generate Golang / Protobuf Related Files

protoc --go_out=. --go-grpc_out=. proto/swa_service.proto

Install New Dependencies

go mod tidy

Instal Evans gRPC Client (OPTIONAL)

go install github.com/ktr0731/evans@latest

About

A Sample Microservices Project

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors