-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathservice.proto
More file actions
152 lines (120 loc) · 5.38 KB
/
Copy pathservice.proto
File metadata and controls
152 lines (120 loc) · 5.38 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
syntax = "proto3";
package v1;
import "google/protobuf/wrappers.proto";
import "model.proto";
option go_package = "github.com/polarismesh/specification/source/go/api/v1/service_manage";
option java_package = "com.tencent.polaris.specification.api.v1.service.manage";
option java_outer_classname = "ServiceProto";
message Service {
google.protobuf.StringValue name = 1;
google.protobuf.StringValue namespace = 2;
map<string, string> metadata = 3;
google.protobuf.StringValue ports = 4;
google.protobuf.StringValue business = 5;
google.protobuf.StringValue department = 6;
google.protobuf.StringValue cmdb_mod1 = 7 [json_name = "cmdb_mod1"];
google.protobuf.StringValue cmdb_mod2 = 8 [json_name = "cmdb_mod2"];
google.protobuf.StringValue cmdb_mod3 = 9 [json_name = "cmdb_mod3"];
google.protobuf.StringValue comment = 10;
google.protobuf.StringValue owners = 11;
google.protobuf.StringValue token = 12;
google.protobuf.StringValue ctime = 13;
google.protobuf.StringValue mtime = 14;
google.protobuf.StringValue revision = 15;
google.protobuf.StringValue platform_id = 16 [json_name = "platform_id"];
google.protobuf.UInt32Value total_instance_count = 17 [json_name = "total_instance_count"];
google.protobuf.UInt32Value healthy_instance_count = 18 [json_name = "healthy_instance_count"];
repeated google.protobuf.StringValue user_ids = 19 [json_name = "user_ids"];
repeated google.protobuf.StringValue group_ids = 20 [json_name = "group_ids"];
repeated google.protobuf.StringValue remove_user_ids = 22 [json_name = "remove_user_ids"];
repeated google.protobuf.StringValue remove_group_ids = 23 [json_name = "remove_group_ids"];
google.protobuf.StringValue id = 21;
google.protobuf.BoolValue editable = 24;
repeated google.protobuf.StringValue export_to = 25 [ json_name = "export_to" ];
bool sync_to_global_registry = 26 [ json_name = "sync_to_global_registry" ];
google.protobuf.UInt32Value isolate_instance_count = 27 [json_name = "isolate_instance_count"];
ServiceStatus service_status = 28 [json_name = "service_status"];
google.protobuf.BoolValue deleteable = 100;
// 服务类型,例如:微服务、MCP Server、AI Agent等
ServiceType service_type = 101 [json_name = "service_type"];
}
// 服务类型枚举
enum ServiceType {
// 微服务(默认值)
SERVICE_TYPE_MICROSERVICE = 0;
// MCP Server,通过 MCP (SSE / Streamable HTTP)提供 AI 工具能力
SERVICE_TYPE_MCP_SERVER = 1;
// AI Agent,具有自主决策能力的智能体服务
SERVICE_TYPE_AI_AGENT = 2;
}
enum ServiceStatus {
NORMAL = 0; //服务状态正常
ABNORMAL = 1; //服务状态异常
OFFLINE = 2; //服务离线
}
enum AliasType {
DEFAULT = 0;
CL5SID = 1;
}
message ServiceAlias {
google.protobuf.StringValue service = 1;
google.protobuf.StringValue namespace = 2;
google.protobuf.StringValue alias = 3;
google.protobuf.StringValue alias_namespace = 4 [json_name = "alias_namespace"];
AliasType type = 5;
google.protobuf.StringValue owners = 6;
google.protobuf.StringValue comment = 7;
google.protobuf.StringValue service_token = 8 [json_name = "service_token"];
google.protobuf.StringValue ctime = 9;
google.protobuf.StringValue mtime = 10;
google.protobuf.StringValue id = 11;
google.protobuf.BoolValue editable = 12;
google.protobuf.BoolValue deleteable = 13;
repeated google.protobuf.StringValue export_to = 25 [ json_name = "export_to" ];
map<string, string> metadata = 26;
}
message Instance {
google.protobuf.StringValue id = 1;
google.protobuf.StringValue service = 2;
google.protobuf.StringValue namespace = 3;
google.protobuf.StringValue vpc_id = 21 [json_name = "vpc_id"];
google.protobuf.StringValue host = 4;
google.protobuf.UInt32Value port = 5;
// 通信协议类型
// MCP Server 使用以下协议类型:
// - "mcp-sse":基于 Server-Sent Events 的 MCP 传输协议
// - "mcp-streamable-http":基于 Streamable HTTP 的 MCP 传输协议
google.protobuf.StringValue protocol = 6;
// 服务版本
// MCP Server 使用 mcp-server-version,不是 mcp-protocol-version
google.protobuf.StringValue version = 7;
google.protobuf.UInt32Value priority = 8;
google.protobuf.UInt32Value weight = 9;
google.protobuf.BoolValue enable_health_check = 20;
HealthCheck health_check = 10;
google.protobuf.BoolValue healthy = 11;
google.protobuf.BoolValue isolate = 12;
Location location = 13;
// 实例元数据
// MCP Server 使用以下标准键:
// - "mcp-server-name":MCP Server 的名称,等于 service。必填
// - "mcp-protocol-version":MCP 协议版本,例如:"2025-03-26"。可选
// - "mcp-endpoint-path":MCP Server 的服务端点路径,例如:"/mcp"、"/sse"。可选
map<string, string> metadata = 14;
google.protobuf.StringValue logic_set = 15 [json_name = "logic_set"];
google.protobuf.StringValue ctime = 16;
google.protobuf.StringValue mtime = 17;
google.protobuf.StringValue revision = 18;
google.protobuf.StringValue service_token = 19 [json_name = "service_token"];
}
message HealthCheck {
enum HealthCheckType {
UNKNOWN = 0;
HEARTBEAT = 1;
}
HealthCheckType type = 1;
HeartbeatHealthCheck heartbeat = 2;
}
message HeartbeatHealthCheck {
google.protobuf.UInt32Value ttl = 1;
}