This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new b957f6a8a8 [INLONG-8856][SDK] Add msg information for dataproxy cpp 
sdk (#8857)
b957f6a8a8 is described below

commit b957f6a8a831a6560b9c5fc0c4f3c9f0ee411d24
Author: doleyzi <[email protected]>
AuthorDate: Sat Sep 9 18:07:32 2023 +0800

    [INLONG-8856][SDK] Add msg information for dataproxy cpp sdk (#8857)
    
    Co-authored-by: doleyzi <[email protected]>
---
 .../dataproxy-sdk-cpp/release/inc/sdk_msg.h        | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git 
a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/release/inc/sdk_msg.h 
b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/release/inc/sdk_msg.h
new file mode 100644
index 0000000000..a8cae707fa
--- /dev/null
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/release/inc/sdk_msg.h
@@ -0,0 +1,52 @@
+/*
+* 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.
+ */
+
+#ifndef SDK_USER_MSG_H_
+#define SDK_USER_MSG_H_
+
+#include <stdint.h>
+#include <functional>
+#include <memory>
+#include <string>
+namespace inlong {
+using UserCallBack = std::function<int32_t(const char*, const char*, const 
char*, int32_t, const int64_t, const char*)>;
+
+struct UserMsg {
+  std::string msg_;
+  std::string client_ip_;
+  int64_t report_time_;
+  UserCallBack cb_;
+
+  int64_t user_report_time_;
+  std::string user_client_ip_;
+
+  std::string data_pack_format_attr_;
+  UserMsg(const std::string& mmsg, const std::string& mclient_ip, int64_t 
mreport_time, UserCallBack mcb,
+          const std::string& attr, const std::string& u_ip, int64_t u_time)
+      : msg_(mmsg),
+        client_ip_(mclient_ip),
+        report_time_(mreport_time),
+        cb_(mcb),
+        user_report_time_(u_time),
+        user_client_ip_(u_ip),
+        data_pack_format_attr_(attr){}
+};
+using UserMsgPtr = std::shared_ptr<UserMsg>;
+
+}  // namespace inlong
+
+#endif  // SDK_USER_MSG_H_
\ No newline at end of file

Reply via email to