HomeArtTechHackBlockchain
ONLINE ·
Index
/
Technology
/
Article

gRPC 101

Operator
Khomkrid Lerdprasert
Filed
December 23, 2020
Channel
Technology
Read
~1 min
gRPC 101

ทดลองทำ gRPC Microservice ติดต่อระหว่างกันไปมา ด้วย Golang

ไม่ได้ Clean code อะไรทั้งนั้น โด้สดๆ แล้วก้อเอามาแปะไว้เลย

Install compiler Protobuf

$ brew install protobuf
$ protoc --version
libprotoc 3.14.0
$ brew install protoc-gen-go

Generate code by protoc & protoc-gen-go in protos directory

protoc -I . \
--go_out . --go_opt paths=source_relative \
--go-grpc_out . --go-grpc_opt paths=source_relative \
person/person.proto

and Rest

protoc -I . --grpc-gateway_out . \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
person/person.proto

Let’s do it

Download Sourcode ได้ที่นี่

  1. สั่ง go run person_server/main.go
  2. สั่ง go run position_server/main.go
  3. สั่ง go run client/main.go

◎ Tags

##Go lang##gRPC
Khomkrid Lerdprasert
Operator

Khomkrid Lerdprasert

Technical Lead — building AI-powered platforms, omni-channel chat systems, and telemedicine solutions with Go, Next.js & clean architecture. 20+ years shipping software from crypto wallets to e-learning systems. Bangkok-based. Writes code late at night, brews beer on weekends.

GithubInstagram
Previous · transmission
เขียน Store Procedure เพื่อ Insert Random Coupon ลง Mysql
Next · transmission
FUZE For Nintendo Switch
Metadata
Channel
Technology
Filed
December 23, 2020
Read
~1 min
Language
TH / EN
Transmit

Related

สร้าง Key pair เพื่อทำการ signing document signature ด้วย Go lang
Khomkrid Lerdprasert
March 13, 2024
1 min
aofiee.dev
signal / noise / code · craft
© 2019 – 2026, Khomkrid Lerdprasert.
All transmissions logged.
No newsletter. No profiling. Cookies require consent.
PGP · 7F3D 2024 A21E B584 · 0x7F3D
Channels
  • Art & Culture
  • Technology
  • Hack 101
  • Blockchain 101
  • Archive / All posts
— END OF TRANSMISSION —
// powered by curiosity, coffee, & wuxia
BKK · 13°45′N · 100°30′E