hello-world

command module
v0.0.0-...-838b099 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 11 Imported by: 0

README

gRPC Hello World

An example of a gRPC client and a server. It is a modification of the official gRPC example.

Setup

  1. Install protobuf compiler and the plugin for Go.

    $ brew install protobuf
    $ go install github.com/golang/protobuf/protoc-gen-go@latest
    $ # Run the following if you haven't done so already.
    $ export PATH="$PATH:$(go env GOPATH)/bin"
    
  2. Generate code from the protobuf definition file.

    $ mkdir hello
    $ protoc -I . hello.proto --go_out=plugins=grpc:$(PROTO_DIR) \
      --go_opt=paths=source_relative
    
  3. Run both server and client concurrently.

    $ go run main.go
    

    You can also run the following command that combines previous steps.

    $ make run
    

Reference and Credits

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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