Skip to content

mg52/go-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-grpc

$ go mod init github.com/mg52/go-grpc

$ go install google.golang.org/protobuf/cmd/[email protected]

$ go install google.golang.org/grpc/cmd/[email protected]

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

// create grpc-stream/greetpb/greet.proto

$ protoc --go_out=. --go_opt=paths=source_relative
--go-grpc_out=. --go-grpc_opt=paths=source_relative
grpc-stream/greetpb/greet.proto

$ go get google.golang.org/grpc

// add sever and client folder and files.


// run server in a terminal

$ go run grpc-stream/server/server.go


// run client in another terminal for server streaming

$ go run grpc-stream/client/client.go -o 0 -f name -l lastname


// run client in another terminal for client streaming

$ go run grpc-stream/client/client.go -o 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages