dummy service
Instructions (url: https://www.youtube.com/watch?v=YudT0nHvkkE)
- create three directories
- go mod init example.com/go-usermgmt-grpc
- create usermgmt.proto
- protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative usermgmt/usermgmt.proto
- if there is an error protoc-gen-go-grpc: program not found or is not executable then: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- file usermgmt.pb.go and usermgmt_grpc.pb.go created
- write usermgmt_server/usermgmt_server.go and usermgt_client/usermgmt_client.go
- run them go run usermgmt_client/usermgmt_client.go and go run usermgmt_server/usermgmt_server.go
modifying
- modified usermgmt.proto: added messages and service rpc GetUsers(GetUserParams) returns (UserList) {};
- modified _server.go