MySQL
9.3.0
Source Code Documentation
guidelines_schema.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License, version 2.0,
6
as published by the Free Software Foundation.
7
8
This program is designed to work with certain software (including
9
but not limited to OpenSSL) that is licensed under separate terms,
10
as designated in a particular file or component or in included license
11
documentation. The authors of MySQL hereby grant you an additional
12
permission to link the program and your derivative works with the
13
separately licensed software that they have either included with
14
the program or referenced in the documentation.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
*/
25
26
#ifndef ROUTER_SRC_ROUTING_GUIDELINES_SCHEMA_H_
27
#define ROUTER_SRC_ROUTING_GUIDELINES_SCHEMA_H_
28
29
constexpr
const
char
*
const
k_routing_guidelines_schema
=
30
R
"({
31
"$schema":"https://json-schema.org/draft/2020-12/schema",
32
"title":"MySQL Router routing guidelines engine document schema",
33
"type":"object",
34
"properties":{
35
"name":{
36
"description":"Name of the routing guidelines document",
37
"type":"string"
38
},
39
"version":{
40
"description":"Version of the routing guidelines document",
41
"type":"string"
42
},
43
"destinations":{
44
"description":"Entries representing set of MySQL server instances",
45
"type":"array",
46
"items":{
47
"type":"object",
48
"properties":{
49
"name":{
50
"description":"Unique name of the given destinations entry",
51
"type":"string"
52
},
53
"match":{
54
"description":"Matching criteria for destinations class",
55
"type":"string"
56
}
57
},
58
"required":[
59
"name",
60
"match"
61
]
62
},
63
"minItems":1,
64
"uniqueItems":true
65
},
66
"routes":{
67
"description":"Routes entries that are binding destinations with connection matching criteria",
68
"type":"array",
69
"items":{
70
"type":"object",
71
"properties":{
72
"name":{
73
"description":"Name of the route",
74
"type":"string"
75
},
76
"connectionSharingAllowed":{
77
"type":"boolean"
78
},
79
"enabled":{
80
"type":"boolean"
81
},
82
"match":{
83
"description":"Connection matching criteria",
84
"type":"string"
85
},
86
"destinations":{
87
"description":"Destination groups used for routing, by order of preference",
88
"type":"array",
89
"items":{
90
"type":"object",
91
"properties":{
92
"classes":{
93
"description":"Destination group",
94
"type":"array",
95
"items":{
96
"description":"Reference to 'name' entries in the 'destinations' section",
97
"type":"string"
98
}
99
},
100
"strategy":{
101
"description":"Routing strategy that will be used for this route",
102
"type":"string",
103
"enum":[
104
"round-robin",
105
"first-available"
106
]
107
},
108
"priority":{
109
"description":"Priority of the given group",
110
"type":"integer",
111
"minimum":0
112
}
113
},
114
"required":[
115
"classes",
116
"strategy",
117
"priority"
118
],
119
"minItems":1,
120
"uniqueItems":true
121
}
122
}
123
},
124
"required":[
125
"name",
126
"match",
127
"destinations"
128
],
129
"minItems":1,
130
"uniqueItems":true
131
}
132
}
133
},
134
"required":[
135
"version",
136
"destinations",
137
"routes"
138
],
139
"additionalProperties": false,
140
141
"match_rules":{
142
"keywords":{
143
"type": "array",
144
"items":{
145
"type": "string",
146
"enum": %s
147
}
148
},
149
"functions":{
150
"type": "array",
151
"items":{
152
"type": "string",
153
"enum": %s
154
}
155
},
156
"variables":{
157
"type": "array",
158
"items":{
159
"type": "string",
160
"enum": %s
161
}
162
}
163
}
164
})";
165
166
#endif
// ROUTER_SRC_ROUTING_GUIDELINES_SCHEMA_H_
k_routing_guidelines_schema
constexpr const char *const k_routing_guidelines_schema
Definition:
guidelines_schema.h:29
router
src
routing_guidelines
src
guidelines_schema.h
Generated by
1.9.2