Apache Shenyu Admin is the management system of the gateway, which can manage all plugins, selectors and rules visually, set users, roles and resources.
Plugin: ShenYu uses the plugin design idea to realize the hot plug of the plugin, which is easy to expand. Built-in rich plugins, including RPC proxy, circuit breaker and current limiting, authority and certification, monitoring, and more.
Selector: Each plugin can set multiple selectors to carry out preliminary filtering of traffic.
Rule: Multiple rules can be set per selector for more fine-grained control of flow.
The Database Table UML Diagram:
Detailed design:
One plugin corresponds to multiple selectors,one selector corresponds to multiple rules.
One selector corresponds to multiple match conditions,one rule corresponds to multiple match conditions.
Each rule handles differently in corresponding plugin according to field handler,field handler is a kind of data of JSON string type.You can view detail during the use of shenyu-admin.
The resource are the menus and buttons in the shenyu-admin console.
Resource Permission use database to store user name,role,resource data and relationship.
The Resource Permission Table UML Diagram:
Detailed design:
Data Permission use database to store the relationship between users, selectors and rules.
The Data Permission Table UML Diagram:
Detailed design:
data_permission
, where a user corresponds to multiple data permissions.data_type
distinguishes between different types of data, which corresponds to the following: 0 -> selector, 1 -> rule.data_id
holds the primary key id of the corresponding type.path
: When the gateway is requested, a piece of data will be matched according to path
, and then the subsequent process will be carried out.
rpc_ext
: Used to hold extended information for the RPC proxy.。
shenyu-admin
and finally stored in the API document tables.query
, header
and body
, all of them are json
stored in mock_request_record
,but body
does not support special types such as file。ext
of the tag
table stores the full amount of json data of its parent tag (including the parent tag of the parent tag, and so on).ext
of the api
table may store the IP list and the service name of SpringCloud
.type
of the parameter
table mainly includes requestUrlParam
, requestHeader
, requestBody
, requestPathVariable
, responseHeader
, and responseBody
; If the returned type is a special type (such as file), do not associate model_id
.ext
of the field
table stores generic type in json format (convenient for subsequent expansion), such as {"genericTypes": [model_id1, model_id2]}
; model_id
indicates which type has this field, self_model_id
indicates which type of this field.is_example
of detail
table indicates whether a value is a request sample value, true is a request sample value, and false is a response value.