diff --git a/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/LogProxyProto.java b/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/LogProxyProto.java index 16a575ace4c2a456dd94c2098a4c92d7920a344a..294185ba8511f065ef4f1ce56b2d7abb41bed6ba 100644 --- a/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/LogProxyProto.java +++ b/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/LogProxyProto.java @@ -1,15 +1,5 @@ -/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved. -oblogclient is licensed under Mulan PSL v2. -You can use this software according to the terms and conditions of the Mulan PSL v2. -You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -See the Mulan PSL v2 for more details. */ - // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: file/LogProxy.proto +// source: common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/logproxy.proto package com.oceanbase.clogproxy.common.packet.protocol; @@ -29,17 +19,29 @@ public final class LogProxyProto { com.google.protobuf.MessageOrBuilder { /** + *
+ * error code + *+ * *
int32 code = 1;
* @return The code.
*/
int getCode();
/**
+ * + * error message + *+ * *
string message = 2;
* @return The message.
*/
java.lang.String getMessage();
/**
+ * + * error message + *+ * *
string message = 2;
* @return The bytes for message.
*/
@@ -47,6 +49,10 @@ public final class LogProxyProto {
getMessageBytes();
}
/**
+ * + * error response + *+ * * Protobuf type {@code oceanbase.logproxy.ErrorResponse} */ public static final class ErrorResponse extends @@ -138,6 +144,10 @@ public final class LogProxyProto { public static final int CODE_FIELD_NUMBER = 1; private int code_; /** + *
+ * error code + *+ * *
int32 code = 1;
* @return The code.
*/
@@ -149,6 +159,10 @@ public final class LogProxyProto {
public static final int MESSAGE_FIELD_NUMBER = 2;
private volatile java.lang.Object message_;
/**
+ * + * error message + *+ * *
string message = 2;
* @return The message.
*/
@@ -166,6 +180,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * error message + *+ * *
string message = 2;
* @return The bytes for message.
*/
@@ -350,6 +368,10 @@ public final class LogProxyProto {
return builder;
}
/**
+ * + * error response + *+ * * Protobuf type {@code oceanbase.logproxy.ErrorResponse} */ public static final class Builder extends @@ -505,6 +527,10 @@ public final class LogProxyProto { private int code_ ; /** + *
+ * error code + *+ * *
int32 code = 1;
* @return The code.
*/
@@ -513,6 +539,10 @@ public final class LogProxyProto {
return code_;
}
/**
+ * + * error code + *+ * *
int32 code = 1;
* @param value The code to set.
* @return This builder for chaining.
@@ -524,6 +554,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * error code + *+ * *
int32 code = 1;
* @return This builder for chaining.
*/
@@ -536,6 +570,10 @@ public final class LogProxyProto {
private java.lang.Object message_ = "";
/**
+ * + * error message + *+ * *
string message = 2;
* @return The message.
*/
@@ -552,6 +590,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * error message + *+ * *
string message = 2;
* @return The bytes for message.
*/
@@ -569,6 +611,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * error message + *+ * *
string message = 2;
* @param value The message to set.
* @return This builder for chaining.
@@ -584,6 +630,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * error message + *+ * *
string message = 2;
* @return This builder for chaining.
*/
@@ -594,6 +644,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * error message + *+ * *
string message = 2;
* @param value The bytes for message to set.
* @return This builder for chaining.
@@ -668,7 +722,7 @@ public final class LogProxyProto {
/**
* - * LogType + * log type. 0 for OceanBase ** *
int32 log_type = 1;
@@ -677,11 +731,19 @@ public final class LogProxyProto {
int getLogType();
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return The ip.
*/
java.lang.String getIp();
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return The bytes for ip.
*/
@@ -689,11 +751,19 @@ public final class LogProxyProto {
getIpBytes();
/**
+ * + * client id + *+ * *
string id = 3;
* @return The id.
*/
java.lang.String getId();
/**
+ * + * client id + *+ * *
string id = 3;
* @return The bytes for id.
*/
@@ -701,11 +771,19 @@ public final class LogProxyProto {
getIdBytes();
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return The version.
*/
java.lang.String getVersion();
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return The bytes for version.
*/
@@ -713,17 +791,29 @@ public final class LogProxyProto {
getVersionBytes();
/**
+ * + * whether enable monitor or not + *+ * *
bool enable_monitor = 5;
* @return The enableMonitor.
*/
boolean getEnableMonitor();
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return The configuration.
*/
java.lang.String getConfiguration();
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return The bytes for configuration.
*/
@@ -731,6 +821,10 @@ public final class LogProxyProto {
getConfigurationBytes();
}
/**
+ * + * request body for handshake + *+ * * Protobuf type {@code oceanbase.logproxy.ClientHandshakeRequest} */ public static final class ClientHandshakeRequest extends @@ -849,7 +943,7 @@ public final class LogProxyProto { private int logType_; /** *
- * LogType + * log type. 0 for OceanBase ** *
int32 log_type = 1;
@@ -863,6 +957,10 @@ public final class LogProxyProto {
public static final int IP_FIELD_NUMBER = 2;
private volatile java.lang.Object ip_;
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return The ip.
*/
@@ -880,6 +978,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return The bytes for ip.
*/
@@ -901,6 +1003,10 @@ public final class LogProxyProto {
public static final int ID_FIELD_NUMBER = 3;
private volatile java.lang.Object id_;
/**
+ * + * client id + *+ * *
string id = 3;
* @return The id.
*/
@@ -918,6 +1024,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * client id + *+ * *
string id = 3;
* @return The bytes for id.
*/
@@ -939,6 +1049,10 @@ public final class LogProxyProto {
public static final int VERSION_FIELD_NUMBER = 4;
private volatile java.lang.Object version_;
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return The version.
*/
@@ -956,6 +1070,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return The bytes for version.
*/
@@ -977,6 +1095,10 @@ public final class LogProxyProto {
public static final int ENABLE_MONITOR_FIELD_NUMBER = 5;
private boolean enableMonitor_;
/**
+ * + * whether enable monitor or not + *+ * *
bool enable_monitor = 5;
* @return The enableMonitor.
*/
@@ -988,6 +1110,10 @@ public final class LogProxyProto {
public static final int CONFIGURATION_FIELD_NUMBER = 6;
private volatile java.lang.Object configuration_;
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return The configuration.
*/
@@ -1005,6 +1131,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return The bytes for configuration.
*/
@@ -1231,6 +1361,10 @@ public final class LogProxyProto {
return builder;
}
/**
+ * + * request body for handshake + *+ * * Protobuf type {@code oceanbase.logproxy.ClientHandshakeRequest} */ public static final class Builder extends @@ -1414,7 +1548,7 @@ public final class LogProxyProto { private int logType_ ; /** *
- * LogType + * log type. 0 for OceanBase ** *
int32 log_type = 1;
@@ -1426,7 +1560,7 @@ public final class LogProxyProto {
}
/**
* - * LogType + * log type. 0 for OceanBase ** *
int32 log_type = 1;
@@ -1441,7 +1575,7 @@ public final class LogProxyProto {
}
/**
* - * LogType + * log type. 0 for OceanBase ** *
int32 log_type = 1;
@@ -1456,6 +1590,10 @@ public final class LogProxyProto {
private java.lang.Object ip_ = "";
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return The ip.
*/
@@ -1472,6 +1610,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return The bytes for ip.
*/
@@ -1489,6 +1631,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * client ip + *+ * *
string ip = 2;
* @param value The ip to set.
* @return This builder for chaining.
@@ -1504,6 +1650,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * client ip + *+ * *
string ip = 2;
* @return This builder for chaining.
*/
@@ -1514,6 +1664,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * client ip + *+ * *
string ip = 2;
* @param value The bytes for ip to set.
* @return This builder for chaining.
@@ -1532,6 +1686,10 @@ public final class LogProxyProto {
private java.lang.Object id_ = "";
/**
+ * + * client id + *+ * *
string id = 3;
* @return The id.
*/
@@ -1548,6 +1706,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * client id + *+ * *
string id = 3;
* @return The bytes for id.
*/
@@ -1565,6 +1727,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * client id + *+ * *
string id = 3;
* @param value The id to set.
* @return This builder for chaining.
@@ -1580,6 +1746,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * client id + *+ * *
string id = 3;
* @return This builder for chaining.
*/
@@ -1590,6 +1760,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * client id + *+ * *
string id = 3;
* @param value The bytes for id to set.
* @return This builder for chaining.
@@ -1608,6 +1782,10 @@ public final class LogProxyProto {
private java.lang.Object version_ = "";
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return The version.
*/
@@ -1624,6 +1802,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return The bytes for version.
*/
@@ -1641,6 +1823,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * protocol version + *+ * *
string version = 4;
* @param value The version to set.
* @return This builder for chaining.
@@ -1656,6 +1842,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * protocol version + *+ * *
string version = 4;
* @return This builder for chaining.
*/
@@ -1666,6 +1856,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * protocol version + *+ * *
string version = 4;
* @param value The bytes for version to set.
* @return This builder for chaining.
@@ -1684,6 +1878,10 @@ public final class LogProxyProto {
private boolean enableMonitor_ ;
/**
+ * + * whether enable monitor or not + *+ * *
bool enable_monitor = 5;
* @return The enableMonitor.
*/
@@ -1692,6 +1890,10 @@ public final class LogProxyProto {
return enableMonitor_;
}
/**
+ * + * whether enable monitor or not + *+ * *
bool enable_monitor = 5;
* @param value The enableMonitor to set.
* @return This builder for chaining.
@@ -1703,6 +1905,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * whether enable monitor or not + *+ * *
bool enable_monitor = 5;
* @return This builder for chaining.
*/
@@ -1715,6 +1921,10 @@ public final class LogProxyProto {
private java.lang.Object configuration_ = "";
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return The configuration.
*/
@@ -1731,6 +1941,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return The bytes for configuration.
*/
@@ -1748,6 +1962,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @param value The configuration to set.
* @return This builder for chaining.
@@ -1763,6 +1981,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @return This builder for chaining.
*/
@@ -1773,6 +1995,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * generated configuration string + *+ * *
string configuration = 6;
* @param value The bytes for configuration to set.
* @return This builder for chaining.
@@ -1846,17 +2072,29 @@ public final class LogProxyProto {
com.google.protobuf.MessageOrBuilder {
/**
+ * + * status code. 0 for success + *+ * *
int32 code = 1;
* @return The code.
*/
int getCode();
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return The ip.
*/
java.lang.String getIp();
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return The bytes for ip.
*/
@@ -1864,11 +2102,19 @@ public final class LogProxyProto {
getIpBytes();
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return The version.
*/
java.lang.String getVersion();
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return The bytes for version.
*/
@@ -1876,6 +2122,10 @@ public final class LogProxyProto {
getVersionBytes();
}
/**
+ * + * response body for handshake + *+ * * Protobuf type {@code oceanbase.logproxy.ClientHandshakeResponse} */ public static final class ClientHandshakeResponse extends @@ -1974,6 +2224,10 @@ public final class LogProxyProto { public static final int CODE_FIELD_NUMBER = 1; private int code_; /** + *
+ * status code. 0 for success + *+ * *
int32 code = 1;
* @return The code.
*/
@@ -1985,6 +2239,10 @@ public final class LogProxyProto {
public static final int IP_FIELD_NUMBER = 2;
private volatile java.lang.Object ip_;
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return The ip.
*/
@@ -2002,6 +2260,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return The bytes for ip.
*/
@@ -2023,6 +2285,10 @@ public final class LogProxyProto {
public static final int VERSION_FIELD_NUMBER = 3;
private volatile java.lang.Object version_;
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return The version.
*/
@@ -2040,6 +2306,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return The bytes for version.
*/
@@ -2234,6 +2504,10 @@ public final class LogProxyProto {
return builder;
}
/**
+ * + * response body for handshake + *+ * * Protobuf type {@code oceanbase.logproxy.ClientHandshakeResponse} */ public static final class Builder extends @@ -2396,6 +2670,10 @@ public final class LogProxyProto { private int code_ ; /** + *
+ * status code. 0 for success + *+ * *
int32 code = 1;
* @return The code.
*/
@@ -2404,6 +2682,10 @@ public final class LogProxyProto {
return code_;
}
/**
+ * + * status code. 0 for success + *+ * *
int32 code = 1;
* @param value The code to set.
* @return This builder for chaining.
@@ -2415,6 +2697,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * status code. 0 for success + *+ * *
int32 code = 1;
* @return This builder for chaining.
*/
@@ -2427,6 +2713,10 @@ public final class LogProxyProto {
private java.lang.Object ip_ = "";
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return The ip.
*/
@@ -2443,6 +2733,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return The bytes for ip.
*/
@@ -2460,6 +2754,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @param value The ip to set.
* @return This builder for chaining.
@@ -2475,6 +2773,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @return This builder for chaining.
*/
@@ -2485,6 +2787,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy ip + *+ * *
string ip = 2;
* @param value The bytes for ip to set.
* @return This builder for chaining.
@@ -2503,6 +2809,10 @@ public final class LogProxyProto {
private java.lang.Object version_ = "";
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return The version.
*/
@@ -2519,6 +2829,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return The bytes for version.
*/
@@ -2536,6 +2850,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @param value The version to set.
* @return This builder for chaining.
@@ -2551,6 +2869,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @return This builder for chaining.
*/
@@ -2561,6 +2883,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy version + *+ * *
string version = 3;
* @param value The bytes for version to set.
* @return This builder for chaining.
@@ -2634,11 +2960,19 @@ public final class LogProxyProto {
com.google.protobuf.MessageOrBuilder {
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @return The ip.
*/
java.lang.String getIp();
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @return The bytes for ip.
*/
@@ -2646,24 +2980,40 @@ public final class LogProxyProto {
getIpBytes();
/**
+ * + * log proxy port + *+ * *
int32 port = 2;
* @return The port.
*/
int getPort();
/**
+ * + * number of stream for log transmission + *+ * *
int32 stream_count = 3;
* @return The streamCount.
*/
int getStreamCount();
/**
+ * + * number of worker processes + *+ * *
int32 worker_count = 4;
* @return The workerCount.
*/
int getWorkerCount();
}
/**
+ * + * log proxy status + *+ * * Protobuf type {@code oceanbase.logproxy.RuntimeStatus} */ public static final class RuntimeStatus extends @@ -2765,6 +3115,10 @@ public final class LogProxyProto { public static final int IP_FIELD_NUMBER = 1; private volatile java.lang.Object ip_; /** + *
+ * log proxy ip + *+ * *
string ip = 1;
* @return The ip.
*/
@@ -2782,6 +3136,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @return The bytes for ip.
*/
@@ -2803,6 +3161,10 @@ public final class LogProxyProto {
public static final int PORT_FIELD_NUMBER = 2;
private int port_;
/**
+ * + * log proxy port + *+ * *
int32 port = 2;
* @return The port.
*/
@@ -2814,6 +3176,10 @@ public final class LogProxyProto {
public static final int STREAM_COUNT_FIELD_NUMBER = 3;
private int streamCount_;
/**
+ * + * number of stream for log transmission + *+ * *
int32 stream_count = 3;
* @return The streamCount.
*/
@@ -2825,6 +3191,10 @@ public final class LogProxyProto {
public static final int WORKER_COUNT_FIELD_NUMBER = 4;
private int workerCount_;
/**
+ * + * number of worker processes + *+ * *
int32 worker_count = 4;
* @return The workerCount.
*/
@@ -3021,6 +3391,10 @@ public final class LogProxyProto {
return builder;
}
/**
+ * + * log proxy status + *+ * * Protobuf type {@code oceanbase.logproxy.RuntimeStatus} */ public static final class Builder extends @@ -3188,6 +3562,10 @@ public final class LogProxyProto { private java.lang.Object ip_ = ""; /** + *
+ * log proxy ip + *+ * *
string ip = 1;
* @return The ip.
*/
@@ -3204,6 +3582,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @return The bytes for ip.
*/
@@ -3221,6 +3603,10 @@ public final class LogProxyProto {
}
}
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @param value The ip to set.
* @return This builder for chaining.
@@ -3236,6 +3622,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @return This builder for chaining.
*/
@@ -3246,6 +3636,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy ip + *+ * *
string ip = 1;
* @param value The bytes for ip to set.
* @return This builder for chaining.
@@ -3264,6 +3658,10 @@ public final class LogProxyProto {
private int port_ ;
/**
+ * + * log proxy port + *+ * *
int32 port = 2;
* @return The port.
*/
@@ -3272,6 +3670,10 @@ public final class LogProxyProto {
return port_;
}
/**
+ * + * log proxy port + *+ * *
int32 port = 2;
* @param value The port to set.
* @return This builder for chaining.
@@ -3283,6 +3685,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * log proxy port + *+ * *
int32 port = 2;
* @return This builder for chaining.
*/
@@ -3295,6 +3701,10 @@ public final class LogProxyProto {
private int streamCount_ ;
/**
+ * + * number of stream for log transmission + *+ * *
int32 stream_count = 3;
* @return The streamCount.
*/
@@ -3303,6 +3713,10 @@ public final class LogProxyProto {
return streamCount_;
}
/**
+ * + * number of stream for log transmission + *+ * *
int32 stream_count = 3;
* @param value The streamCount to set.
* @return This builder for chaining.
@@ -3314,6 +3728,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * number of stream for log transmission + *+ * *
int32 stream_count = 3;
* @return This builder for chaining.
*/
@@ -3326,6 +3744,10 @@ public final class LogProxyProto {
private int workerCount_ ;
/**
+ * + * number of worker processes + *+ * *
int32 worker_count = 4;
* @return The workerCount.
*/
@@ -3334,6 +3756,10 @@ public final class LogProxyProto {
return workerCount_;
}
/**
+ * + * number of worker processes + *+ * *
int32 worker_count = 4;
* @param value The workerCount to set.
* @return This builder for chaining.
@@ -3345,6 +3771,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * number of worker processes + *+ * *
int32 worker_count = 4;
* @return This builder for chaining.
*/
@@ -3413,7 +3843,7 @@ public final class LogProxyProto {
/**
* - * CompressType + * compress type. 0 for no compress ** *
int32 compress_type = 1;
@@ -3422,18 +3852,30 @@ public final class LogProxyProto {
int getCompressType();
/**
+ * + * length of raw data + *+ * *
int32 raw_len = 2;
* @return The rawLen.
*/
int getRawLen();
/**
+ * + * original length of data + *+ * *
int32 compressed_len = 3;
* @return The compressedLen.
*/
int getCompressedLen();
/**
+ * + * record count + *+ * *
int32 count = 4;
* @return The count.
*/
@@ -3441,7 +3883,7 @@ public final class LogProxyProto {
/**
* - * resevered for other options + * bytes array of records ** *
bytes records = 100;
@@ -3450,6 +3892,10 @@ public final class LogProxyProto {
com.google.protobuf.ByteString getRecords();
}
/**
+ * + * record data + *+ * * Protobuf type {@code oceanbase.logproxy.RecordData} */ public static final class RecordData extends @@ -3556,7 +4002,7 @@ public final class LogProxyProto { private int compressType_; /** *
- * CompressType + * compress type. 0 for no compress ** *
int32 compress_type = 1;
@@ -3570,6 +4016,10 @@ public final class LogProxyProto {
public static final int RAW_LEN_FIELD_NUMBER = 2;
private int rawLen_;
/**
+ * + * length of raw data + *+ * *
int32 raw_len = 2;
* @return The rawLen.
*/
@@ -3581,6 +4031,10 @@ public final class LogProxyProto {
public static final int COMPRESSED_LEN_FIELD_NUMBER = 3;
private int compressedLen_;
/**
+ * + * original length of data + *+ * *
int32 compressed_len = 3;
* @return The compressedLen.
*/
@@ -3592,6 +4046,10 @@ public final class LogProxyProto {
public static final int COUNT_FIELD_NUMBER = 4;
private int count_;
/**
+ * + * record count + *+ * *
int32 count = 4;
* @return The count.
*/
@@ -3604,7 +4062,7 @@ public final class LogProxyProto {
private com.google.protobuf.ByteString records_;
/**
* - * resevered for other options + * bytes array of records ** *
bytes records = 100;
@@ -3815,6 +4273,10 @@ public final class LogProxyProto {
return builder;
}
/**
+ * + * record data + *+ * * Protobuf type {@code oceanbase.logproxy.RecordData} */ public static final class Builder extends @@ -3988,7 +4450,7 @@ public final class LogProxyProto { private int compressType_ ; /** *
- * CompressType + * compress type. 0 for no compress ** *
int32 compress_type = 1;
@@ -4000,7 +4462,7 @@ public final class LogProxyProto {
}
/**
* - * CompressType + * compress type. 0 for no compress ** *
int32 compress_type = 1;
@@ -4015,7 +4477,7 @@ public final class LogProxyProto {
}
/**
* - * CompressType + * compress type. 0 for no compress ** *
int32 compress_type = 1;
@@ -4030,6 +4492,10 @@ public final class LogProxyProto {
private int rawLen_ ;
/**
+ * + * length of raw data + *+ * *
int32 raw_len = 2;
* @return The rawLen.
*/
@@ -4038,6 +4504,10 @@ public final class LogProxyProto {
return rawLen_;
}
/**
+ * + * length of raw data + *+ * *
int32 raw_len = 2;
* @param value The rawLen to set.
* @return This builder for chaining.
@@ -4049,6 +4519,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * length of raw data + *+ * *
int32 raw_len = 2;
* @return This builder for chaining.
*/
@@ -4061,6 +4535,10 @@ public final class LogProxyProto {
private int compressedLen_ ;
/**
+ * + * original length of data + *+ * *
int32 compressed_len = 3;
* @return The compressedLen.
*/
@@ -4069,6 +4547,10 @@ public final class LogProxyProto {
return compressedLen_;
}
/**
+ * + * original length of data + *+ * *
int32 compressed_len = 3;
* @param value The compressedLen to set.
* @return This builder for chaining.
@@ -4080,6 +4562,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * original length of data + *+ * *
int32 compressed_len = 3;
* @return This builder for chaining.
*/
@@ -4092,6 +4578,10 @@ public final class LogProxyProto {
private int count_ ;
/**
+ * + * record count + *+ * *
int32 count = 4;
* @return The count.
*/
@@ -4100,6 +4590,10 @@ public final class LogProxyProto {
return count_;
}
/**
+ * + * record count + *+ * *
int32 count = 4;
* @param value The count to set.
* @return This builder for chaining.
@@ -4111,6 +4605,10 @@ public final class LogProxyProto {
return this;
}
/**
+ * + * record count + *+ * *
int32 count = 4;
* @return This builder for chaining.
*/
@@ -4124,7 +4622,7 @@ public final class LogProxyProto {
private com.google.protobuf.ByteString records_ = com.google.protobuf.ByteString.EMPTY;
/**
* - * resevered for other options + * bytes array of records ** *
bytes records = 100;
@@ -4136,7 +4634,7 @@ public final class LogProxyProto {
}
/**
* - * resevered for other options + * bytes array of records ** *
bytes records = 100;
@@ -4154,7 +4652,7 @@ public final class LogProxyProto {
}
/**
* - * resevered for other options + * bytes array of records ** *
bytes records = 100;
@@ -4253,21 +4751,22 @@ public final class LogProxyProto {
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\023file/LogProxy.proto\022\022oceanbase.logprox" +
- "y\".\n\rErrorResponse\022\014\n\004code\030\001 \001(\005\022\017\n\007mess" +
- "age\030\002 \001(\t\"\202\001\n\026ClientHandshakeRequest\022\020\n\010" +
- "log_type\030\001 \001(\005\022\n\n\002ip\030\002 \001(\t\022\n\n\002id\030\003 \001(\t\022\017" +
- "\n\007version\030\004 \001(\t\022\026\n\016enable_monitor\030\005 \001(\010\022" +
- "\025\n\rconfiguration\030\006 \001(\t\"D\n\027ClientHandshak" +
- "eResponse\022\014\n\004code\030\001 \001(\005\022\n\n\002ip\030\002 \001(\t\022\017\n\007v" +
- "ersion\030\003 \001(\t\"U\n\rRuntimeStatus\022\n\n\002ip\030\001 \001(" +
- "\t\022\014\n\004port\030\002 \001(\005\022\024\n\014stream_count\030\003 \001(\005\022\024\n" +
- "\014worker_count\030\004 \001(\005\"l\n\nRecordData\022\025\n\rcom" +
- "press_type\030\001 \001(\005\022\017\n\007raw_len\030\002 \001(\005\022\026\n\016com" +
- "pressed_len\030\003 \001(\005\022\r\n\005count\030\004 \001(\005\022\017\n\007reco" +
- "rds\030d \001(\014B?\n.com.oceanbase.clogproxy.com" +
- "mon.packet.protocolB\rLogProxyProtob\006prot" +
- "o3"
+ "\nRcommon/src/main/java/com/oceanbase/clo" +
+ "gproxy/common/packet/protocol/logproxy.p" +
+ "roto\022\022oceanbase.logproxy\".\n\rErrorRespons" +
+ "e\022\014\n\004code\030\001 \001(\005\022\017\n\007message\030\002 \001(\t\"\202\001\n\026Cli" +
+ "entHandshakeRequest\022\020\n\010log_type\030\001 \001(\005\022\n\n" +
+ "\002ip\030\002 \001(\t\022\n\n\002id\030\003 \001(\t\022\017\n\007version\030\004 \001(\t\022\026" +
+ "\n\016enable_monitor\030\005 \001(\010\022\025\n\rconfiguration\030" +
+ "\006 \001(\t\"D\n\027ClientHandshakeResponse\022\014\n\004code" +
+ "\030\001 \001(\005\022\n\n\002ip\030\002 \001(\t\022\017\n\007version\030\003 \001(\t\"U\n\rR" +
+ "untimeStatus\022\n\n\002ip\030\001 \001(\t\022\014\n\004port\030\002 \001(\005\022\024" +
+ "\n\014stream_count\030\003 \001(\005\022\024\n\014worker_count\030\004 \001" +
+ "(\005\"l\n\nRecordData\022\025\n\rcompress_type\030\001 \001(\005\022" +
+ "\017\n\007raw_len\030\002 \001(\005\022\026\n\016compressed_len\030\003 \001(\005" +
+ "\022\r\n\005count\030\004 \001(\005\022\017\n\007records\030d \001(\014B?\n.com." +
+ "oceanbase.clogproxy.common.packet.protoc" +
+ "olB\rLogProxyProtob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
diff --git a/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/logproxy.proto b/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/logproxy.proto
new file mode 100644
index 0000000000000000000000000000000000000000..236081ffd58e6ae2675de04d5091216eed37239c
--- /dev/null
+++ b/common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/logproxy.proto
@@ -0,0 +1,67 @@
+syntax = "proto3";
+
+package oceanbase.logproxy;
+
+option java_package = "com.oceanbase.clogproxy.common.packet.protocol";
+option java_outer_classname = "LogProxyProto";
+
+// error response
+message ErrorResponse {
+ // error code
+ int32 code = 1;
+ // error message
+ string message = 2;
+}
+
+// request body for handshake
+message ClientHandshakeRequest {
+ // log type. 0 for OceanBase
+ int32 log_type = 1;
+ // client ip
+ string ip = 2;
+ // client id
+ string id = 3;
+ // protocol version
+ string version = 4;
+ // whether enable monitor or not
+ bool enable_monitor = 5;
+ // generated configuration string
+ string configuration = 6;
+}
+
+// response body for handshake
+message ClientHandshakeResponse {
+ // status code. 0 for success
+ int32 code = 1;
+ // log proxy ip
+ string ip = 2;
+ // log proxy version
+ string version = 3;
+}
+
+// log proxy status
+message RuntimeStatus {
+ // log proxy ip
+ string ip = 1;
+ // log proxy port
+ int32 port = 2;
+ // number of stream for log transmission
+ int32 stream_count = 3;
+ // number of worker processes
+ int32 worker_count = 4;
+}
+
+// record data
+message RecordData {
+ // compress type. 0 for no compress
+ int32 compress_type = 1;
+ // length of raw data
+ int32 raw_len = 2;
+ // original length of data
+ int32 compressed_len = 3;
+ // record count
+ int32 count = 4;
+
+ // bytes array of records
+ bytes records = 100;
+}
diff --git a/scripts/protoc.sh b/scripts/protoc.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d91c6aedc0dc73d266aa17a7e533815e23d982d6
--- /dev/null
+++ b/scripts/protoc.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cd "$(dirname "$0")/.." || exit
+
+protoc --java_out=common/src/main/java common/src/main/java/com/oceanbase/clogproxy/common/packet/protocol/logproxy.proto