streaming

command
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MPL-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gRPC streaming Example

This example builds a plugin & client which can stream a large amount of data between them while staying below reasonable message size limits of the gRPC protocol.

Note: hashicorp/go-plugin sets an upper limit on message size. At time of writing, that value is math.MaxInt32 bytes, or approximately 2GB.

To execute

Build the plugin

go build -o ./plugin/streamer ./plugin

Launch the client:

go run main.go myfile

The client will first write data to the streamer plugin, and then the client will read that data back from the plugin. The plugin writes the data it receives in a file called myfile, due to the argument passed to the client above.

To re-generate protobuf definitions

Install protobuf tooling

brew install protobuf@29
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.6
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0

generate files

cd proto
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative streamer.proto

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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