-
Notifications
You must be signed in to change notification settings - Fork 21
/
melody.json
136 lines (136 loc) · 2.89 KB
/
melody.json
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
"version": 1,
"extra_config": {
"melody_gologging": {
"level": "DEBUG",
"prefix": "[Melody]",
"syslog": false,
"stdout": true,
"format": "default"
},
"melody_metrics": {
"proxy_disable": false,
"router_disabled": false,
"backend_disabled": false,
"endpoint_disabled": false,
"collection_time": "10s"
},
"melody_influxdb": {
"address": "http://localhost:8086",
"username": "",
"password": "",
"buffer_size": 4096,
"ttl": "10s",
"db": "melody_data_p1",
"time_out": "1s",
"data_server_enable": true,
"data_server_port": ":8001",
"data_server_query_enable": true
},
"melody_alert": {
"NumGC": "100",
"NumGoroutine": "100",
"Sys": "200m",
"HeapSys": "150m",
"StackSys": "50m",
"MCacheSys": "50m",
"MSpanSys": "20m"
}
},
"timeout": "3000ms",
"cache_ttl": "300s",
"output_encoding": "json",
"port": 8000,
"endpoints": [
{
"endpoint": "/roles",
"method": "GET",
"extra_config": {
"melody_jose_validator": {
"alg": "RS256",
"cache": true,
"jwk-url": "http://localhost:9001/public",
"issuer": "Melody",
"disable_jwk_security": true
},
"melody_alert": {
"size": "1m",
"time": "1s"
}
},
"output_encoding": "json",
"backends": [
{
"url_pattern": "/roles",
"encoding": "json",
"method": "GET",
"host": [
"http://127.0.0.1:9001"
],
"group": "roles_info"
}
]
},
{
"endpoint": "/get-person",
"method": "GET",
"extra_config": {
"melody_alert": {
"size": "1m",
"time": "1s"
}
},
"output_encoding": "json",
"backends": [
{
"url_pattern": "/person/1/Grant",
"encoding": "json",
"extra_config": {
},
"method": "GET",
"host": [
"127.0.0.1:9001"
]
}
]
},
{
"endpoint": "/list",
"backends": [
{
"url_pattern": "/pages",
"is_collection": true,
"mapping": {
"collection": "list"
},
"host": [
"http://127.0.0.1:9001"
]
}
]
},
{
"endpoint": "/token",
"method": "POST",
"backends": [
{
"url_pattern": "/auth/login",
"host": [
"127.0.0.1:9001"
]
}
],
"extra_config": {
"melody_jose_signer": {
"alg": "RS256",
"jwk-url": "http://localhost:9001/private",
"kid": "melody",
"keys-to-sign": [
"data"
],
"disable_jwk_security": true
}
}
}
]
}