grpc/

directory
v0.1.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0

README

Automi Streaming and gRPC Streaming

Automi can be used to stream data to and from gRPC streaming servers and clients. The example in this directory shows how that can be done:

  • server.go - Sets up a time service that streams time values at a specified interval.
  • client.go - Uses Automi to stream time values from the gRPC server.
  • protobuf/time.proto - Protobuf file for gPRC service

Building and running

First, generate the gRPC Go client/server files with protoc:

$> protoc -I=./protobuf --go_out=plugins=grpc:./protobuf ./protobuf/time.proto

Run the server:

go run ./server/server.go

In a different terminal, run the client:

go run ./client/client.go

Directories

Path Synopsis
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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