-
Notifications
You must be signed in to change notification settings - Fork 5
/
zilla.yaml
104 lines (104 loc) · 2.38 KB
/
zilla.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Example
bindings:
north_tcp_server:
type: tcp
kind: server
options:
host: 0.0.0.0
port:
- 7114
routes:
- when:
- port: 7114
exit: north_http_server
north_http_server:
type: http
kind: server
options:
access-control:
policy: cross-origin
routes:
- when:
- headers:
:method: GET
:path: /tasks
exit: north_sse_server
exit: north_http_kafka_mapping
north_sse_server:
type: sse
kind: server
exit: north_sse_kafka_mapping
north_sse_kafka_mapping:
type: sse-kafka
kind: proxy
routes:
- when:
- path: /tasks
exit: north_kafka_cache_client
with:
event:
id: '["${base64(key)}","${etag}"]'
topic: task-snapshots
north_http_kafka_mapping:
type: http-kafka
kind: proxy
routes:
- when:
- method: POST
path: /tasks
exit: north_kafka_cache_client
with:
capability: produce
reply-to: task-replies
topic: task-commands
key: ${idempotencyKey}
overrides:
todo-command:operation: CreateTaskCommand
- when:
- method: PUT
path: /tasks/{id}
exit: north_kafka_cache_client
with:
capability: produce
reply-to: task-replies
topic: task-commands
key: ${params.id}
overrides:
todo-command:operation: UpdateTaskCommand
- when:
- method: DELETE
path: /tasks/{id}
exit: north_kafka_cache_client
with:
capability: produce
reply-to: task-replies
topic: task-commands
key: ${params.id}
overrides:
todo-command:operation: DeleteTaskCommand
north_kafka_cache_client:
type: kafka
kind: cache_client
exit: south_kafka_cache_server
south_kafka_cache_server:
type: kafka
kind: cache_server
options:
bootstrap:
- task-replies
- task-snapshots
exit: south_kafka_client
south_kafka_client:
type: kafka
kind: client
options:
servers:
- ${{env.KAFKA_BOOTSTRAP_SERVER}}
exit: south_tcp_client
south_tcp_client:
type: tcp
kind: client
telemetry:
exporters:
stdout_logs_exporter:
type: stdout