-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti-workflow-config.yaml
More file actions
80 lines (68 loc) · 1.55 KB
/
multi-workflow-config.yaml
File metadata and controls
80 lines (68 loc) · 1.55 KB
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
requires:
plugins:
- name: api
- name: messaging
- name: workflow-plugin-http
modules:
- name: api-http-server
type: http.server
config:
address: ":8080"
- name: api-router
type: http.router
- name: auth-middleware
type: http.middleware.auth
config:
secretKey: "my-secret-key"
- name: message-broker
type: messaging.broker
- name: users-api
type: api.handler
config:
resourceName: "users"
- name: products-api
type: api.handler
config:
resourceName: "products"
- name: health-handler
type: http.handler
config:
contentType: "application/json"
- name: user-event-handler
type: messaging.handler
- name: audit-log-handler
type: messaging.handler
workflows:
http:
routes:
# Public endpoints
- method: GET
path: /health
handler: health-handler
# Protected endpoints
- method: GET
path: /api/users
handler: users-api
middlewares:
- auth-middleware
- method: POST
path: /api/users
handler: users-api
middlewares:
- auth-middleware
- method: GET
path: /api/products
handler: products-api
middlewares:
- auth-middleware
- method: POST
path: /api/products
handler: products-api
middlewares:
- auth-middleware
messaging:
subscriptions:
- topic: user-events
handler: user-event-handler
- topic: audit-logs
handler: audit-log-handler