-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice.proto
More file actions
117 lines (97 loc) · 3.79 KB
/
service.proto
File metadata and controls
117 lines (97 loc) · 3.79 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
syntax = "proto3";
package v1;
import "types.proto";
option go_package = "github.com/pole-io/specification/source/go/api/v1/service_manage";
option java_package = "io.pole.specification.api.v1.service.manage";
option java_outer_classname = "ServiceProto";
message SimpleService {
string name = 2 [ json_name = "name" ];
string namespace = 3 [ json_name = "namespace" ];
}
message Service {
string id = 1 [ json_name = "id" ];
string name = 2 [ json_name = "name" ];
string namespace = 3 [ json_name = "namespace" ];
map<string, string> metadata = 4 [ json_name = "metadata" ];
string ports = 5 [ json_name = "ports" ];
string business = 6 [ json_name = "business" ];
string department = 7 [ json_name = "department" ];
string cmdb_mod1 = 8 [json_name = "cmdb_mod1"];
string cmdb_mod2 = 9 [json_name = "cmdb_mod2"];
string cmdb_mod3 = 10 [json_name = "cmdb_mod3"];
string comment = 11 [ json_name = "comment" ];
string owners = 12 [ json_name = "owners" ];
string token = 13 [ json_name = "token" ];
string ctime = 14 [ json_name = "ctime" ];
string mtime = 15 [ json_name = "mtime" ];
string revision = 16 [ json_name = "revision" ];
repeated string export_to = 17 [ json_name = "export_to" ];
uint32 total_instance_count = 30 [json_name = "total_instance_count"];
uint32 healthy_instance_count = 31 [json_name = "healthy_instance_count"];
bool editable = 40 [ json_name = "editable" ];
bool deleteable = 41 [ json_name = "deleteable" ];
}
enum AliasType {
DEFAULT = 0;
CL5SID = 1;
}
message ServiceAlias {
string service = 1 [ json_name = "service" ];
string namespace = 2 [ json_name = "namespace" ];
string alias = 3 [ json_name = "alias" ];
string alias_namespace = 4 [json_name = "alias_namespace"];
AliasType type = 5 [ json_name = "type" ];
string owners = 6 [ json_name = "owners" ];
string comment = 7 [ json_name = "comment" ];
string service_token = 8 [json_name = "service_token"];
string ctime = 9 [ json_name = "ctime" ];
string mtime = 10 [ json_name = "mtime" ];
string id = 11 [ json_name = "id" ];
bool editable = 12 [ json_name = "editable" ];
bool deleteable = 13 [ json_name = "deleteable" ];
}
message Instance {
string id = 1 [ json_name = "id" ];
string service = 2 [ json_name = "service" ];
string namespace = 3 [ json_name = "namespace" ];
string host = 4 [ json_name = "host" ];
uint32 port = 5 [ json_name = "port" ];
string protocol = 6 [ json_name = "protocol" ];
string version = 7 [ json_name = "version" ];
uint32 priority = 8 [ json_name = "priority" ];
uint32 weight = 9 [ json_name = "weight" ];
bool enable_health_check = 20 [json_name = "enable_health_check"];
HealthCheck health_check = 10 [json_name = "health_check"];
bool healthy = 11 [json_name = "healthy"];
bool isolate = 12 [json_name = "isolate"];
Location location = 13 [json_name = "location"];
map<string, string> metadata = 14 [json_name = "metadata"];
string ctime = 16 [json_name = "ctime"];
string mtime = 17 [json_name = "mtime"];
string revision = 18 [json_name = "revision"];
}
message HealthCheck {
enum HealthCheckType {
UNKNOWN = 0;
HEARTBEAT = 1;
}
HealthCheckType type = 1 [ json_name = "type" ];
HeartbeatHealthCheck heartbeat = 2 [ json_name = "heartbeat" ];
}
message HeartbeatHealthCheck {
uint32 ttl = 1;
}
message InstanceLabels {
string namespace = 2;
string service = 3;
string service_id = 4;
map<string, StringList> labels = 1;
}
message ServiceKey {
string name = 1 [ json_name = "name" ];
string namespace = 2 [ json_name = "namespace" ];
}
message ServiceSubscriber {
ServiceKey caller = 1 [ json_name = "caller" ];
repeated ServiceKey callee = 2 [ json_name = "callee" ];
}