Compare commits

..

No commits in common. "etap1" and "master" have entirely different histories.

6 changed files with 0 additions and 134 deletions

View File

@ -5,19 +5,3 @@ Poszczególne etapy pracy i poznawania krakend w osobnych brancz'ach.
Całość oparta do docker. Całość oparta do docker.
- etap1 (podstawka) - etap1 (podstawka)
Proste zmokowane api oraz krakend config-watcher (restertujący usługę po zmianie pliku konfiguracyjnego). Fajny patent wykorzystujący [Reflex](https://github.com/cespare/reflex).
Sekwencyjne proxy w KrakenD:
```mermaid
sequenceDiagram
Użytkownik->>KrakenD: /sequential/{id}
KrakenD->>Backend: /users/{id}.json
Backend-->>KrakenD: response_0
KrakenD->>Backend: /projects/{response_0.user_id}.json
Backend-->>KrakenD: response_1
KrakenD-->>KrakenD: merge response[]
KrakenD->>+Użytkownik: Response
```

View File

@ -1,4 +0,0 @@
{
"owner": 1,
"name": "Simple project"
}

View File

@ -1,4 +0,0 @@
{
"id": 1,
"username": "test"
}

View File

@ -1,4 +0,0 @@
{
"id": 2,
"username": "test2"
}

View File

@ -1,28 +0,0 @@
version: "3.8"
services:
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268:14268"
api:
image: paramah/lwan
volumes:
- ./api-mocks:/opt/lwan/wwwroot
ports:
- "8000:8080"
kraken:
image: devopsfaith/krakend:config-watcher
volumes:
- ./krakend:/etc/krakend
ports:
- "1234:1234"
- "8080:8080"
- "8091:8091"
depends_on:
- api
- jaeger

View File

@ -1,78 +0,0 @@
{
"version": 2,
"timeout": "3000ms",
"cache_ttl": "300s",
"host": [
"http://api:8080"
],
"extra_config": {
"github_com/devopsfaith/krakend-metrics": {
"listen_address": ":8091"
},
"github_com/devopsfaith/krakend-gologging": {
"level": "DEBUG",
"prefix": "[KRAKEND]",
"syslog": false,
"stdout": true
},
"github_com/devopsfaith/krakend-opencensus": {
"sample_rate": 100,
"reporting_period": 1,
"exporters": {
"jaeger": {
"endpoint": "http://jaeger:14268",
"service_name": "krakend"
}
}
},
"github_com/devopsfaith/krakend-cors": {
"allow_origins": [
"http://localhost:8000"
],
"allow_methods": [
"POST",
"GET"
],
"allow_headers": [
"Origin",
"Authorization",
"Content-Type"
],
"expose_headers": [
"Content-Length"
],
"max_age": "12h"
}
},
"endpoints":[
{
"endpoint": "/sequential/{id}",
"backend": [
{
"url_pattern": "/users/{id}.json",
"whitelist": [
"id",
"username"
],
"extra_config": {},
"encoding": "json",
"blacklist": [
"id"
]
},
{
"url_pattern": "/projects/{resp0_id}.json",
"whitelist": [
"name"
],
"group": "projects"
}
],
"extra_config": {
"github.com/devopsfaith/krakend/proxy": {
"sequential": true
}
}
}
]
}