服务支持fastcgi;路径规则支持匹配后缀

This commit is contained in:
刘祥超
2021-05-10 21:13:47 +08:00
parent ed9d2f23f6
commit 0ba003e7d9
13 changed files with 1772 additions and 193 deletions

View File

@@ -0,0 +1,16 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
// HTTP Fastcgi定义
message HTTPFastcgi {
int64 id = 1;
bool isOn = 2;
string address = 3;
bytes paramsJSON = 4;
bytes readTimeoutJSON = 5;
bytes connTimeoutJSON = 6;
int32 poolSize = 7;
string pathInfoPattern = 8;
}

View File

@@ -0,0 +1,67 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/rpc_messages.proto";
import "models/model_http_fastcgi.proto";
// Fastcgi服务
service HTTPFastcgiService {
// 创建Fastcgi
rpc createHTTPFastcgi (CreateHTTPFastcgiRequest) returns (CreateHTTPFastcgiResponse);
// 修改Fastcgi
rpc updateHTTPFastcgi (UpdateHTTPFastcgiRequest) returns (RPCSuccess);
// 获取Fastcgi详情
rpc findEnabledHTTPFastcgi (FindEnabledHTTPFastcgiRequest) returns (FindEnabledHTTPFastcgiResponse);
// 获取Fastcgi配置
rpc findEnabledHTTPFastcgiConfig (FindEnabledHTTPFastcgiConfigRequest) returns (FindEnabledHTTPFastcgiConfigResponse);
}
// 创建Fastcgi服务
message CreateHTTPFastcgiRequest {
bool isOn = 1;
string address = 2;
bytes paramsJSON = 3;
bytes readTimeoutJSON = 4;
bytes connTimeoutJSON = 5;
int32 poolSize = 6;
string pathInfoPattern = 7;
}
message CreateHTTPFastcgiResponse {
int64 httpFastcgiId = 1;
}
// 修改Fastcgi服务
message UpdateHTTPFastcgiRequest {
int64 httpFastcgiId = 1;
bool isOn = 2;
string address = 3;
bytes paramsJSON = 4;
bytes readTimeoutJSON = 5;
bytes connTimeoutJSON = 6;
int32 poolSize = 7;
string pathInfoPattern = 8;
}
// 获取Fastcgi详情
message FindEnabledHTTPFastcgiRequest {
int64 httpFastcgiId = 1;
}
message FindEnabledHTTPFastcgiResponse {
HTTPFastcgi httpFastcgi = 1;
}
// 获取Fastcgi配置
message FindEnabledHTTPFastcgiConfigRequest {
int64 httpFastcgiId = 1;
}
message FindEnabledHTTPFastcgiConfigResponse {
bytes httpFastcgiJSON = 1;
}

View File

@@ -26,21 +26,21 @@ message CreateHTTPGzipRequest {
}
message CreateHTTPGzipResponse {
int64 gzipId = 1;
int64 httpGzipId = 1;
}
// 查找Gzip配置
message FindEnabledGzipConfigRequest {
int64 gzipId = 1;
int64 httpGzipId = 1;
}
message FindEnabledGzipConfigResponse {
bytes gzipJSON = 1;
bytes httpGzipJSON = 1;
}
// 修改Gzip配置
message UpdateHTTPGzipRequest {
int64 gzipId = 1;
int64 httpGzipId = 1;
int32 level = 2;
SizeCapacity minLength = 3;
SizeCapacity maxLength = 4;

View File

@@ -58,6 +58,9 @@ service HTTPWebService {
// 更改Websocket设置
rpc updateHTTPWebWebsocket (UpdateHTTPWebWebsocketRequest) returns (RPCSuccess);
// 更改Fastcgi设置
rpc updateHTTPWebFastcgi (UpdateHTTPWebFastcgiRequest) returns (RPCSuccess);
// 更改重写规则设置
rpc updateHTTPWebRewriteRules (UpdateHTTPWebRewriteRulesRequest) returns (RPCSuccess);
@@ -179,6 +182,12 @@ message UpdateHTTPWebWebsocketRequest {
bytes websocketJSON = 2;
}
// 更改Fastcgi设置
message UpdateHTTPWebFastcgiRequest {
int64 webId = 1;
bytes fastcgiJSON = 2;
}
// 更改重写规则设置
message UpdateHTTPWebRewriteRulesRequest {
int64 webId = 1;