mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-05-04 22:35:48 +08:00
实现修改缓存配置
This commit is contained in:
10
pkg/rpc/protos/model_http_cache_policy.proto
Normal file
10
pkg/rpc/protos/model_http_cache_policy.proto
Normal file
@@ -0,0 +1,10 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
message HTTPCachePolicy {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
bool isOn = 3;
|
||||
}
|
||||
@@ -7,8 +7,7 @@ message HTTPWeb {
|
||||
int64 id = 1;
|
||||
bool isOn = 2;
|
||||
string root = 3;
|
||||
int64 gzipId = 4;
|
||||
string charset = 5;
|
||||
int64 requestHeaderPolicyId = 6;
|
||||
int64 responseHeaderPolicyId = 7;
|
||||
string charset = 4;
|
||||
int64 requestHeaderPolicyId = 5;
|
||||
int64 responseHeaderPolicyId = 6;
|
||||
}
|
||||
21
pkg/rpc/protos/service_http_cache_policy.proto
Normal file
21
pkg/rpc/protos/service_http_cache_policy.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "model_http_cache_policy.proto";
|
||||
|
||||
service HTTPCachePolicyService {
|
||||
// 获取所有可用策略
|
||||
rpc findAllEnabledHTTPCachePolicies (FindAllEnabledHTTPCachePoliciesRequest) returns (FindAllEnabledHTTPCachePoliciesResponse);
|
||||
}
|
||||
|
||||
// 获取所有可用策略
|
||||
message FindAllEnabledHTTPCachePoliciesRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllEnabledHTTPCachePoliciesResponse {
|
||||
repeated HTTPCachePolicy cachePolicies = 1;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ service HTTPWebService {
|
||||
|
||||
// 更改统计配置
|
||||
rpc updateHTTPStat (UpdateHTTPStatRequest) returns (RPCUpdateSuccess);
|
||||
|
||||
// 更改缓存配置
|
||||
rpc updateHTTPCache (UpdateHTTPCacheRequest) returns (RPCUpdateSuccess);
|
||||
}
|
||||
|
||||
// 创建Web配置
|
||||
@@ -68,7 +71,7 @@ message UpdateHTTPWebRequest {
|
||||
// 更改Gzip配置
|
||||
message UpdateHTTPWebGzipRequest {
|
||||
int64 webId = 1;
|
||||
int64 gzipId = 2;
|
||||
bytes gzipJSON = 2;
|
||||
}
|
||||
|
||||
// 更改字符集配置
|
||||
@@ -111,4 +114,10 @@ message UpdateHTTPAccessLogRequest {
|
||||
message UpdateHTTPStatRequest {
|
||||
int64 webId = 1;
|
||||
bytes statJSON = 2;
|
||||
}
|
||||
|
||||
// 更改缓存配置
|
||||
message UpdateHTTPCacheRequest {
|
||||
int64 webId = 1;
|
||||
bytes cacheJSON = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user