https://github.com/daggerok/knative-riff-spring-cloud-function
Project riff | KNative | Spring Cloud Functions | Spring Cloud Gateway
https://github.com/daggerok/knative-riff-spring-cloud-function
knative riff spring-cloud-function spring-cloud-gateway
Last synced: 6 months ago
JSON representation
Project riff | KNative | Spring Cloud Functions | Spring Cloud Gateway
- Host: GitHub
- URL: https://github.com/daggerok/knative-riff-spring-cloud-function
- Owner: daggerok
- Created: 2020-01-23T20:33:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-24T00:00:40.000Z (about 6 years ago)
- Last Synced: 2025-02-27T02:23:02.119Z (12 months ago)
- Topics: knative, riff, spring-cloud-function, spring-cloud-gateway
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# knative-riff-spring-cloud-function [](https://travis-ci.org/daggerok/knative-riff-spring-cloud-function)
Project riff | KNative | Spring Cloud Functions | Spring Cloud Gateway
Status: IN PROGRESS
## plain java
request:
```bash
http :8000/function name=real
# output:
HTTP/1.1 200 OK
Content-Length: 16
Content-Type: application/json
accept-encoding: gzip, deflate
connection: keep-alive
user-agent: HTTPie/2.0.0
```
response:
```json
{
"upper": "REAL"
}
```
---
request:
```bash
http post :8080/api/function name=gw
# output:
HTTP/1.1 200 OK
Content-Length: 14
Content-Type: application/json
Content-Type: application/json
accept-encoding: gzip, deflate
forwarded: proto=http;host="localhost:8080";for="0:0:0:0:0:0:0:1:56827"
user-agent: HTTPie/2.0.0
x-forwarded-for: 0:0:0:0:0:0:0:1
x-forwarded-host: localhost:8080
x-forwarded-port: 8080
x-forwarded-prefix: /api
x-forwarded-proto: http
```
response:
```json
{
"upper": "GW"
}
```
## docker / docker-compose
```bash
docker-compose build --force-rm --no-cache
docker-compose up --build
http :/api/function name=docker
```
## resources
* [YouTube: KNative and riff for Spring Developers](https://www.youtube.com/watch?v=zCObFAhrhJM)
* [YouTube: Living on the Edge with Spring Cloud Gateway](https://www.youtube.com/watch?v=jOawuL1Xnwo)
* [Spring Cloud Gateway](https://spring.io/projects/spring-cloud-gateway)
* [Project riff](https://projectriff.io/docs/v0.4/getting-started/docker-for-mac)