Skip to content
No description, website, or topics provided.
Go Makefile
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
pkg Connect on gRPC on Run(), trap SIGKILL Aug 14, 2019
.gitignore Block on gRPC connection Aug 14, 2019
Makefile Use proper names for released files. Sep 20, 2019
README.adoc Add README Aug 5, 2019
go.mod Initial implementation Aug 2, 2019
go.sum Initial implementation Aug 2, 2019
main.go Honor the PORT and GRPC_PORT environment variables Sep 20, 2019
riff-rpc.proto Initial implementation Aug 2, 2019


HTTP to riff streaming Adapter

This repository hosts a generic http proxy that can be embedded by riff function buildpacks to enhance function-invokers that only support the riff streaming protocol (based on gRPC) and thus get http request/reply "for free".

Any streaming function that accepts a single input stream and produces a single output stream can be leveraged by that adapter. The adapter wraps the http request into an input stream of size one. After invocation, the output stream (which must also be of size one) is turned into the http response.

When an invoker also supports promotion of a simple request/reply function to a streaming function (by virtue of streamOut =, this allows support of the basic http request/reply interaction automatically.

Usage and Behavior

The go executable produced by this repository acts both as a simple http proxy, and the parent of the actual function invoker process (buildpacks having only entry point).

Let’s assume you want to add http capability to a node function invoker (that then doesn’t need to worry about http support, but only focus on gRPC streaming support). Also assume that the invoker is usually invoked via node server.js and that gRPC support is listening on port 8081 (the default).

Simply replace that entry point with streaming-http-adapter node server.js and the adapter will fork the node process, coupling its lifecyle to its own.

The best way to use this executable is to leverage it as an optional buildpack in a builder definition. See to that end.

You can’t perform that action at this time.