Skip to content

Commit b967dd9

Browse files
committed
Tproxy: Rename 'id' to 'instance_id' to avoid potential confusion
1 parent 15b1275 commit b967dd9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tproxy/rpc/proto/tproxy_rpc.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ message ListResponse {
4949
// HostInfo is the information of a host.
5050
message HostInfo {
5151
// The Instance id
52-
string id = 1;
52+
string instance_id = 1;
5353
// The IP address of the host.
5454
string ip = 2;
5555
// The app id of the host.

tproxy/src/main_service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ impl TproxyRpc for RpcHandler {
387387
.instances
388388
.values()
389389
.map(|instance| PbHostInfo {
390-
id: instance.id.clone(),
390+
instance_id: instance.id.clone(),
391391
ip: instance.ip.to_string(),
392392
app_id: instance.app_id.clone(),
393393
base_domain: base_domain.clone(),
@@ -411,7 +411,7 @@ impl TproxyRpc for RpcHandler {
411411

412412
if let Some(instance) = state.state.instances.get(&request.id) {
413413
let host_info = PbHostInfo {
414-
id: instance.id.clone(),
414+
instance_id: instance.id.clone(),
415415
ip: instance.ip.to_string(),
416416
app_id: instance.app_id.clone(),
417417
base_domain: base_domain.clone(),

tproxy/templates/cvmlist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ <h2>CVM List</h2>
128128
</tr>
129129
{% for host in hosts %}
130130
<tr>
131-
<td>{{ host.id }}</td>
131+
<td>{{ host.instance_id }}</td>
132132
<td>{{ host.app_id }}</td>
133133
<td>{{ host.ip }}</td>
134134
<td class="timestamp">{{ host.latest_handshake }}</td>

0 commit comments

Comments
 (0)