From a37d6d48df3f9630adb5abbeaa8a3febd950f71b Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Thu, 16 Aug 2018 16:24:47 +0800 Subject: [PATCH] Add ping service. --- common/common.proto | 9 +++++++++ register/InstancePing.proto | 35 +++++++++++++++++++++++++++++++++++ register/Register.proto | 5 +++-- 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 register/InstancePing.proto diff --git a/common/common.proto b/common/common.proto index 5135091..71d39f6 100644 --- a/common/common.proto +++ b/common/common.proto @@ -40,3 +40,12 @@ enum DetectPoint { server = 1; proxy = 2; } + +meesage Commands { + repeated Command commands = 1; +} + +message Command { + string command = 1; + repeated KeyStringValuePair args = 2; +} diff --git a/register/InstancePing.proto b/register/InstancePing.proto new file mode 100644 index 0000000..9d9069b --- /dev/null +++ b/register/InstancePing.proto @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = "org.apache.skywalking.apm.network.register"; +option csharp_namespace = "SkyWalking.NetworkProtocol"; + +import "common/common.proto"; + +service ServiceInstancePing { + rpc doPing (ServiceInstancePingPkg) returns (Commands) { + } +} + +message ServiceInstancePingPkg { + int32 serviceInstanceId = 1; + int64 time = 2; +} diff --git a/register/Register.proto b/register/Register.proto index 76d598c..24c83d1 100644 --- a/register/Register.proto +++ b/register/Register.proto @@ -62,8 +62,9 @@ message ServiceInstances { message ServiceInstance { int32 serviceId = 1; string instanceUUID = 2; - repeated KeyStringValuePair tags = 3; - repeated KeyStringValuePair properties = 4; + int64 time = 3; + repeated KeyStringValuePair tags = 4; + repeated KeyStringValuePair properties = 5; } message ServiceInstanceRegisterMapping { -- GitLab