aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/unified_agent_client/helpers.h
diff options
context:
space:
mode:
authorhor911 <hor911@ydb.tech>2023-02-09 12:40:11 +0300
committerhor911 <hor911@ydb.tech>2023-02-09 12:40:11 +0300
commit24689527cd888aa8a640ecb5077e656b3520d373 (patch)
treea613ff4cd9567b7113e8376a17f8b85897a42790 /library/cpp/unified_agent_client/helpers.h
parent8642d3642932f03663ba7d2d9670707c192207fd (diff)
downloadydb-24689527cd888aa8a640ecb5077e656b3520d373.tar.gz
Log backend move
Diffstat (limited to 'library/cpp/unified_agent_client/helpers.h')
-rw-r--r--library/cpp/unified_agent_client/helpers.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/library/cpp/unified_agent_client/helpers.h b/library/cpp/unified_agent_client/helpers.h
new file mode 100644
index 0000000000..9c8f727315
--- /dev/null
+++ b/library/cpp/unified_agent_client/helpers.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "client.h"
+
+#include <util/charset/utf8.h>
+
+namespace NUnifiedAgent::NPrivate {
+ bool IsUtf8(const THashMap<TString, TString>& meta);
+
+ struct ResultReplacingNonUTF {
+ bool IsTruncated{false};
+ size_t BrokenCount{0};
+ TString Data;
+ };
+
+ ResultReplacingNonUTF ReplaceNonUTF(TStringBuf message, char signBrokenSymbol = '?', size_t maxSize = std::numeric_limits<size_t>::max());
+}