Skip to content

Commit

Permalink
Drop gRPC support
Browse files Browse the repository at this point in the history
Knative does not (yet) support gRPC. Since only HTTP is supported,
including any other protocol is pure overhead. Once Knative Serving has
support for gRPC, we'll restore support here. Even then, Knative
Eventing will use a different proto, so the existing gRPC support
wouldn't work anyway.

The facilities for supporting multiple protocols remain in place, even
though only HTTP is supported at the moment.

Fixes projectriff#65
  • Loading branch information
scothis committed Nov 1, 2018
1 parent 3c95149 commit fdbba72
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 1,859 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM node:10.7.0-alpine
WORKDIR /usr/app
COPY . .
ENV HOST 0.0.0.0
ENV GRPC_PORT 10382
ENV HTTP_PORT 8080
RUN npm install --production
EXPOSE 10382 8080
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Purpose
The *node function invoker* provides a Docker base layer for a function consisting of a single NodeJS module.
It accepts gRPC requests, invokes the command for each request in the input stream, and sends the command's output to the stream of gRPC responses.
It accepts HTTP requests, invokes the function for each request in the input stream, and sends the function's output to the HTTP response.

## Development

### Prerequisites

The following tools are required to build this project:

- `node` 8 (only for tests)
- `node` 10 (only for tests)
- [jq](https://stedolan.github.io/jq/download/)
- Docker

Expand Down
2 changes: 1 addition & 1 deletion lib/interaction-models/node-streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function nodeStreamsInteractionModel(fn, argumentTransformer, messageStream) {
const errorMessage = buildErrorMessage(e, {
correlationId: headers.getValue('correlationId')
});
// write errors directly to grpcStream
// write errors directly to messageStream
messageStream.write(errorMessage.toRiffMessage());
}
callback();
Expand Down
32 changes: 0 additions & 32 deletions lib/protocols/grpc.js

This file was deleted.

2 changes: 1 addition & 1 deletion node-invoker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- "*.js"
functionTemplate:
spec:
protocol: grpc
protocol: http
files:
- path: Dockerfile
template: |
Expand Down
Loading

0 comments on commit fdbba72

Please sign in to comment.