NCBI C++ ToolKit
nc_utils.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: nc_utils.cpp 78893 2017-07-27 14:36:24Z gouriano $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Pavel Ivanov
27  *
28  */
29 
30 #include "nc_pch.hpp"
31 
32 #include "nc_utils.hpp"
33 
34 
36 
37 
38 static
40 static
42 
43 
44 struct SStatusMsg
45 {
47  const char* msg;
48 };
49 
50 
51 static string s_UnkStatus = "ERR: Unknown status";
53  {
54  {eStatus_JustStarted, "ERR:Caching is not completed"},
55  {eStatus_Disabled, "ERR:Cache is disabled"},
56  {eStatus_NotAllowed, "ERR:Password in the command doesn't match server settings"},
57  {eStatus_NoDiskSpace, "ERR:Not enough disk space"},
58  {eStatus_BadPassword, "ERR:Access denied."},
59  {eStatus_NotFound, "ERR:BLOB not found."},
60  {eStatus_CondFailed, "ERR:Precondition failed"},
61  {eStatus_NoImpl, "ERR:Not implemented"},
62  {eStatus_ShuttingDown,"ERR:Service unavailable"},
63  {eStatus_BlobTooBig, "ERR:Blob size exceeds the allowed maximum"},
64  {eStatus_NeedAdmin, "ERR:Command requires administrative privileges"},
65  {eStatus_CmdAborted, "ERR:Stale synchronization"},
66  {eStatus_PrematureClose, "ERR:Connection closed too early"},
67  {eStatus_CmdTimeout, "ERR:Command timeout"},
68  {eStatus_BadPeer, "ERR:Protocol error"}
69  };
70 
71 
72 
73 void
75 {
76  size_t num_elems = sizeof(s_StatusMessages) / sizeof(s_StatusMessages[0]);
77  for (size_t i = 0; i < num_elems; ++i) {
78  SStatusMsg& stat_msg = s_StatusMessages[i];
79  s_MsgForStatus[stat_msg.status] = stat_msg.msg;
80  s_StatusForMsg[stat_msg.msg] = stat_msg.status;
81  }
82 }
83 
85 {
86  if (!msg.empty() && NStr::StartsWith(msg, "ERR:")) {
88  i != s_StatusForMsg.end(); ++i) {
89  if (NStr::StartsWith(msg, i->first)) {
90  return i->second;
91  }
92  }
93  }
94  return def;
95 }
96 
97 const string& GetMessageByStatus(EHTTPStatus sts)
98 {
100  return m != s_MsgForStatus.end() ? m->second : s_UnkStatus;
101 }
102 
103 /////////////////////////////////////////////////////////////////////////////
104 // alerts
105 
106 
108 {
109 public:
110  NCAlertData(const string& name, const string& message) :
111  m_LastDetectedTimestamp(CSrvTime::Current()),
112  m_Name(name), m_Message(message),
113  m_TotalCount(1), m_ThisCount(1), m_On(true) {
114  }
115  void Update(const string& message) {
117  m_Message = message;
118  ++m_TotalCount;
119  m_On ? ++m_ThisCount : (m_ThisCount = 1);
120  m_On = true;
121  }
122  void Acknowledge(const string& user) {
124  m_User = user;
125  m_On = false;
126  }
127  bool IsOn(void) const {
128  return m_On;
129  }
130  void Report(CSrvSocketTask& task);
131 private:
134  string m_Name;
135  string m_Message;
136  string m_User;
137  size_t m_TotalCount;
138  size_t m_ThisCount;
139  bool m_On;
140 };
143 
144 
146 {
147  char time_buf[50];
148  string is("\": "),iss("\": \""), eol(",\n\""), eos("\"");
149 
150  task.WriteText("{\n");
151  task.WriteText(eos).WriteText("name" ).WriteText(iss).WriteText(m_Name).WriteText(eos);
152  task.WriteText(eol).WriteText("message" ).WriteText(iss).WriteText(m_Message).WriteText(eos);
154  task.WriteText(eol).WriteText("on" ).WriteText(is).WriteText(m_On? "true" : "false");
155  task.WriteText(eol).WriteText("count" ).WriteText(is).WriteNumber(m_ThisCount);
156  task.WriteText(eol).WriteText("lifetime_count" ).WriteText(is).WriteNumber(m_TotalCount);
157  task.WriteText(eol).WriteText("last_detected_time" ).WriteText(iss).WriteText(time_buf).WriteText(eos);
158  task.WriteText(eol).WriteText("acknowledged_time" );
160  task.WriteText("\": null");
161  task.WriteText(eol).WriteText("user" ).WriteText("\": null");;
162  } else {
164  task.WriteText(iss).WriteText(time_buf).WriteText(eos);
165  task.WriteText(eol).WriteText("user" ).WriteText(iss).WriteText(m_User).WriteText(eos);
166  }
167  task.WriteText("\n}");
168 }
169 
170 void CNCAlerts::Report(CSrvSocketTask& task, bool report_all)
171 {
172  s_Lock.Lock();
173  task.WriteText(",\n\"alerts\": [");
174  bool first = true;
175  for(map< EAlertType, NCAlertData >::iterator it = s_Alerts.begin(); it != s_Alerts.end(); ++it) {
176  if (report_all || it->second.IsOn()) {
177  if (!first) {
178  task.WriteText(",");
179  }
180  it->second.Report(task);
181  first = false;
182  }
183  }
184  task.WriteText("]");
185  s_Lock.Unlock();
186 }
187 
188 void CNCAlerts::Register(EAlertType alert_type, const string& message)
189 {
190  s_Lock.Lock();
191  map< EAlertType, NCAlertData >::iterator found = s_Alerts.find(alert_type);
192  if (found != s_Alerts.end()) {
193  found->second.Update(message);
194  } else {
195  s_Alerts.insert( make_pair(alert_type, NCAlertData(x_TypeToId(alert_type), message)));
196  }
197  s_Lock.Unlock();
198 }
199 
201  const string& user)
202 {
203  EAlertType alert_type = x_IdToType(alert_id);
204  s_Lock.Lock();
206  map< EAlertType, NCAlertData >::iterator found = s_Alerts.find(alert_type);
207  if (found != s_Alerts.end()) {
208  found->second.Acknowledge(user);
210  }
211  s_Lock.Unlock();
212  return res;
213 }
214 
215 
216 struct AlertToId
217 {
219  string id;
220 };
221 
222 static const AlertToId s_alertToIdMap[] = {
223  {CNCAlerts::eUnknown, "Unknown"},
224 #ifdef _DEBUG
225  {CNCAlerts::eDebugOrphanRecordFound, "eDebugOrphanRecordFound"},
226  {CNCAlerts::eDebugOrphanRecordFound2, "eDebugOrphanRecordFound2"},
227  {CNCAlerts::eDebugWriteBlobInfoFailed, "eDebugWriteBlobInfoFailed"},
228  {CNCAlerts::eDebugReadBlobInfoFailed0, "eDebugReadBlobInfoFailed0"},
229  {CNCAlerts::eDebugReadBlobInfoFailed1, "eDebugReadBlobInfoFailed1"},
230  {CNCAlerts::eDebugReadBlobInfoFailed2, "eDebugReadBlobInfoFailed2"},
231  {CNCAlerts::eDebugUpdateUpCoords1, "eDebugUpdateUpCoords1"},
232  {CNCAlerts::eDebugUpdateUpCoords2, "eDebugUpdateUpCoords2"},
233  {CNCAlerts::eDebugWriteBlobInfo1, "eDebugWriteBlobInfo1"},
234  {CNCAlerts::eDebugWriteBlobInfo2, "eDebugWriteBlobInfo2"},
235  {CNCAlerts::eDebugWriteBlobInfo3, "eDebugWriteBlobInfo3"},
236  {CNCAlerts::eDebugWriteBlobInfo4, "eDebugWriteBlobInfo4"},
237  {CNCAlerts::eDebugMoveDataToGarbage, "eDebugMoveDataToGarbage"},
238  {CNCAlerts::eDebugReadMapInfo1, "eDebugReadMapInfo1"},
239  {CNCAlerts::eDebugReadMapInfo2, "eDebugReadMapInfo2"},
240  {CNCAlerts::eDebugReadChunkData1, "eDebugReadChunkData1"},
241  {CNCAlerts::eDebugReadChunkData2, "eDebugReadChunkData2"},
242  {CNCAlerts::eDebugReadChunkData3, "eDebugReadChunkData3"},
243  {CNCAlerts::eDebugReadChunkData4, "eDebugReadChunkData4"},
244  {CNCAlerts::eDebugDeleteNextData1, "eDebugDeleteNextData1"},
245  {CNCAlerts::eDebugDeleteNextData2, "eDebugDeleteNextData2"},
246  {CNCAlerts::eDebugDeleteVersionData, "eDebugDeleteVersionData"},
247  {CNCAlerts::eDebugSaveOneMapImpl1, "eDebugSaveOneMapImpl1"},
248  {CNCAlerts::eDebugSaveOneMapImpl2, "eDebugSaveOneMapImpl2"},
249  {CNCAlerts::eDebugWriteChunkData1, "eDebugWriteChunkData1"},
250  {CNCAlerts::eDebugWriteChunkData2, "eDebugWriteChunkData2"},
251  {CNCAlerts::eDebugMoveRecord0, "eDebugMoveRecord0"},
252  {CNCAlerts::eDebugMoveRecord1, "eDebugMoveRecord1"},
253  {CNCAlerts::eDebugMoveRecord2, "eDebugMoveRecord2"},
254  {CNCAlerts::eDebugMoveRecord3, "eDebugMoveRecord3"},
255  {CNCAlerts::eDebugReleaseCacheData1, "eDebugReleaseCacheData1"},
256  {CNCAlerts::eDebugReleaseCacheData2, "eDebugReleaseCacheData2"},
257  {CNCAlerts::eDebugDeleteFile, "eDebugDeleteFile"},
258  {CNCAlerts::eDebugDeleteSNCBlobVerData, "eDebugDeleteSNCBlobVerData"},
259  {CNCAlerts::eDebugDeleteCNCBlobVerManager, "eDebugDeleteCNCBlobVerManager"},
260  {CNCAlerts::eDebugExtraWrite, "eDebugExtraWrite"},
261  {CNCAlerts::eDebugCacheDeleted1, "eDebugCacheDeleted1"},
262  {CNCAlerts::eDebugCacheDeleted2, "eDebugCacheDeleted2"},
263  {CNCAlerts::eDebugCacheDeleted3, "eDebugCacheDeleted3"},
264  {CNCAlerts::eDebugCacheDeleted4, "eDebugCacheDeleted4"},
265  {CNCAlerts::eDebugCacheFailedMgrAttach, "eDebugCacheFailedMgrAttach"},
266  {CNCAlerts::eDebugCacheFailedMgrDetach, "eDebugCacheFailedMgrDetach"},
267  {CNCAlerts::eDebugCacheWrongMgr, "eDebugCacheWrongMgr"},
268  {CNCAlerts::eDebugCacheWrong, "eDebugCacheWrong"},
269  {CNCAlerts::eDebugWrongCacheFound1, "eDebugWrongCacheFound1"},
270  {CNCAlerts::eDebugWrongCacheFound2, "eDebugWrongCacheFound2"},
271  {CNCAlerts::eDebugSyncAborted1, "eDebugSyncAborted1"},
272  {CNCAlerts::eDebugSyncAborted2, "eDebugSyncAborted2"},
273  {CNCAlerts::eDebugConnAdjusted1, "eDebugConnAdjusted1"},
274  {CNCAlerts::eDebugConnAdjusted2, "eDebugConnAdjusted2"},
275  {CNCAlerts::eDebugDbFileNotFound, "eDebugDbFileNotFound"},
276 #endif
277  {CNCAlerts::eStartupConfigChanged, "StartupConfigChanged"},
278  {CNCAlerts::ePidFileFailed, "PidFileFailed"},
279  {CNCAlerts::eStartAfterCrash, "StartAfterCrash"},
280  {CNCAlerts::eStorageReinit, "StorageReinit"},
281  {CNCAlerts::eAccessDenied, "AccessDenied"},
282  {CNCAlerts::eSyncFailed, "SyncFailed"},
283  {CNCAlerts::ePeerIpChanged, "PeerIpChanged"},
284  {CNCAlerts::eDiskSpaceNormal, "DiskSpaceNormal"},
285  {CNCAlerts::eDatabaseTooLarge, "DatabaseTooLarge"},
286  {CNCAlerts::eDatabaseOverLimit, "DatabaseOverLimit"},
287  {CNCAlerts::eDiskSpaceLow, "DiskSpaceLow"},
288  {CNCAlerts::eDiskSpaceCritical, "DiskSpaceCritical"}
289 };
290 static const size_t s_alertToIdMapSize = sizeof(s_alertToIdMap) / sizeof(AlertToId);
291 
293 {
294  for (size_t k = 0; k < s_alertToIdMapSize; ++k) {
295  if (NStr::CompareNocase(alert_id, s_alertToIdMap[k].id) == 0)
296  return s_alertToIdMap[k].type;
297  }
298  return CNCAlerts::eUnknown;
299 }
300 
302 {
303  for (size_t k = 0; k < s_alertToIdMapSize; ++k) {
304  if (s_alertToIdMap[k].type == type)
305  return s_alertToIdMap[k].id;
306  }
307  return "Unknown";
308 }
309 
Mutex created to have minimum possible size (its size is 4 bytes) and to sleep using kernel capabilit...
Definition: srv_sync.hpp:193
void Unlock(void)
Unlock the mutex.
Definition: srv_sync.cpp:119
void Lock(void)
Lock the mutex.
Definition: srv_sync.cpp:108
static void Register(EAlertType alert_type, const string &message)
Definition: nc_utils.cpp:188
static EAlertType x_IdToType(const string &alert_id)
Definition: nc_utils.cpp:292
@ eAcknowledged
Definition: nc_utils.hpp:257
static string x_TypeToId(EAlertType type)
Definition: nc_utils.cpp:301
static void Report(CSrvSocketTask &task, bool report_all)
Definition: nc_utils.cpp:170
static EAlertAckResult Acknowledge(const string &alert_id, const string &user)
Definition: nc_utils.cpp:200
@ eDebugExtraWrite
Definition: nc_utils.hpp:235
@ eDebugWriteBlobInfo1
Definition: nc_utils.hpp:208
@ eDebugOrphanRecordFound
Definition: nc_utils.hpp:200
@ eSyncFailed
Synchronization failed.
Definition: nc_utils.hpp:191
@ eDebugReadBlobInfoFailed0
Definition: nc_utils.hpp:203
@ eDebugMoveRecord1
Definition: nc_utils.hpp:227
@ eAccessDenied
Command was rejected because client lacks administrative privileges.
Definition: nc_utils.hpp:190
@ eDebugDeleteFile
Definition: nc_utils.hpp:230
@ eDebugSyncAborted1
Definition: nc_utils.hpp:246
@ eStorageReinit
Data storage was reinitialized.
Definition: nc_utils.hpp:189
@ eDebugMoveRecord2
Definition: nc_utils.hpp:228
@ eDebugWrongCacheFound2
Definition: nc_utils.hpp:245
@ eDebugCacheWrongMgr
Definition: nc_utils.hpp:242
@ eDebugSaveOneMapImpl2
Definition: nc_utils.hpp:223
@ eDebugCacheDeleted3
Definition: nc_utils.hpp:238
@ eDebugCacheFailedMgrAttach
Definition: nc_utils.hpp:240
@ eDebugWriteBlobInfoFailed
Definition: nc_utils.hpp:202
@ eDebugDeleteNextData2
Definition: nc_utils.hpp:220
@ eDebugOrphanRecordFound2
Definition: nc_utils.hpp:201
@ eDebugCacheFailedMgrDetach
Definition: nc_utils.hpp:241
@ eDebugUpdateUpCoords2
Definition: nc_utils.hpp:207
@ eDebugReadMapInfo1
Definition: nc_utils.hpp:213
@ eDebugSyncAborted2
Definition: nc_utils.hpp:247
@ eDebugUpdateUpCoords1
Definition: nc_utils.hpp:206
@ eDiskSpaceCritical
Free disk space is below critical threshold.
Definition: nc_utils.hpp:197
@ eDatabaseTooLarge
Database is too large (warning)
Definition: nc_utils.hpp:194
@ eDebugWriteBlobInfo3
Definition: nc_utils.hpp:210
@ eDiskSpaceLow
Free disk space is below threshold.
Definition: nc_utils.hpp:196
@ eDebugConnAdjusted2
Definition: nc_utils.hpp:249
@ eDebugDbFileNotFound
Definition: nc_utils.hpp:250
@ eDebugCacheWrong
Definition: nc_utils.hpp:243
@ eStartAfterCrash
InstanceGuard file was present on startup.
Definition: nc_utils.hpp:188
@ eDebugWriteChunkData2
Definition: nc_utils.hpp:225
@ eDebugWrongCacheFound1
Definition: nc_utils.hpp:244
@ eDebugMoveDataToGarbage
Definition: nc_utils.hpp:212
@ eDatabaseOverLimit
Database size exceeded its limit (error, stop write)
Definition: nc_utils.hpp:195
@ eDebugReadChunkData4
Definition: nc_utils.hpp:218
@ eDebugWriteBlobInfo2
Definition: nc_utils.hpp:209
@ eDebugReadChunkData2
Definition: nc_utils.hpp:216
@ eDiskSpaceNormal
Free disk space is back to normal.
Definition: nc_utils.hpp:193
@ ePeerIpChanged
Peer IP address changed.
Definition: nc_utils.hpp:192
@ eDebugReleaseCacheData1
Definition: nc_utils.hpp:231
@ eDebugSaveOneMapImpl1
Definition: nc_utils.hpp:222
@ eDebugCacheDeleted1
Definition: nc_utils.hpp:236
@ eDebugCacheDeleted2
Definition: nc_utils.hpp:237
@ eDebugDeleteCNCBlobVerManager
Definition: nc_utils.hpp:234
@ eDebugMoveRecord0
Definition: nc_utils.hpp:226
@ ePidFileFailed
Reporting Pid failed.
Definition: nc_utils.hpp:187
@ eStartupConfigChanged
Configuration file changed.
Definition: nc_utils.hpp:186
@ eDebugConnAdjusted1
Definition: nc_utils.hpp:248
@ eDebugWriteChunkData1
Definition: nc_utils.hpp:224
@ eDebugReadChunkData1
Definition: nc_utils.hpp:215
@ eDebugMoveRecord3
Definition: nc_utils.hpp:229
@ eDebugReleaseCacheData2
Definition: nc_utils.hpp:232
@ eDebugReadBlobInfoFailed1
Definition: nc_utils.hpp:204
@ eDebugReadBlobInfoFailed2
Definition: nc_utils.hpp:205
@ eDebugReadChunkData3
Definition: nc_utils.hpp:217
@ eDebugCacheDeleted4
Definition: nc_utils.hpp:239
@ eDebugReadMapInfo2
Definition: nc_utils.hpp:214
@ eDebugDeleteNextData1
Definition: nc_utils.hpp:219
@ eDebugWriteBlobInfo4
Definition: nc_utils.hpp:211
@ eDebugDeleteSNCBlobVerData
Definition: nc_utils.hpp:233
@ eDebugDeleteVersionData
Definition: nc_utils.hpp:221
Task controlling a socket.
CSrvSocketTask & WriteText(CTempString message)
Write text into socket.
CSrvSocketTask & WriteNumber(NumType num)
Write number into socket as string, i.e.
Class incorporating convenient methods to work with struct timespec.
Definition: srv_time.hpp:61
int Compare(const CSrvTime &t) const
Compares object's value to another CSrvTime object's value.
static CSrvTime Current(void)
Exact current time with precision up to nanoseconds.
Uint1 Print(char *buf, EFormatType fmt) const
Formats time value in the object and writes it in buf.
Definition: time_man.cpp:155
@ eFmtHumanSeconds
Format that can be readable by humans with precision up to seconds.
Definition: srv_time.hpp:109
string m_Message
Definition: nc_utils.cpp:135
CSrvTime m_LastDetectedTimestamp
Definition: nc_utils.cpp:132
string m_Name
Definition: nc_utils.cpp:134
string m_User
Definition: nc_utils.cpp:136
void Acknowledge(const string &user)
Definition: nc_utils.cpp:122
CSrvTime m_AcknowledgedTimestamp
Definition: nc_utils.cpp:133
size_t m_TotalCount
Definition: nc_utils.cpp:137
void Report(CSrvSocketTask &task)
Definition: nc_utils.cpp:145
void Update(const string &message)
Definition: nc_utils.cpp:115
NCAlertData(const string &name, const string &message)
Definition: nc_utils.cpp:110
bool IsOn(void) const
Definition: nc_utils.cpp:127
size_t m_ThisCount
Definition: nc_utils.cpp:138
container_type::const_iterator const_iterator
Definition: map.hpp:53
container_type::iterator iterator
Definition: map.hpp:54
Definition: map.hpp:338
#define true
Definition: bool.h:35
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
Definition: ncbistr.cpp:219
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
int i
static string s_UnkStatus
Definition: nc_utils.cpp:51
static map< CNCAlerts::EAlertType, NCAlertData > s_Alerts
Definition: nc_utils.cpp:142
static SStatusMsg s_StatusMessages[]
Definition: nc_utils.cpp:52
const string & GetMessageByStatus(EHTTPStatus sts)
Definition: nc_utils.cpp:97
static CMiniMutex s_Lock
Definition: nc_utils.cpp:141
static const size_t s_alertToIdMapSize
Definition: nc_utils.cpp:290
static map< EHTTPStatus, string > s_MsgForStatus
Definition: nc_utils.cpp:35
static const AlertToId s_alertToIdMap[]
Definition: nc_utils.cpp:222
static map< string, EHTTPStatus > s_StatusForMsg
Definition: nc_utils.cpp:41
EHTTPStatus GetStatusByMessage(const string &msg, EHTTPStatus def)
Definition: nc_utils.cpp:84
void InitClientMessages(void)
Initializes maps between status codes and error texts sent to client to explain these codes.
Definition: nc_utils.cpp:74
EHTTPStatus
Statuses of commands to be set in diagnostics' request context Additional statuses can be taken from ...
Definition: nc_utils.hpp:98
@ eStatus_CmdTimeout
Command timeout is exceeded.
Definition: nc_utils.hpp:136
@ eStatus_Disabled
Client was disabled in configuration.
Definition: nc_utils.hpp:127
@ eStatus_BlobTooBig
Blob size exceeds the allowed maximum.
Definition: nc_utils.hpp:145
@ eStatus_PrematureClose
Connection was closed too early (client didn't send all data or didn't get confirmation about success...
Definition: nc_utils.hpp:148
@ eStatus_NotFound
Blob was not found.
Definition: nc_utils.hpp:129
@ eStatus_NoDiskSpace
There's not enough disk space to execute the command.
Definition: nc_utils.hpp:165
@ eStatus_NeedAdmin
Command requires admin privileges.
Definition: nc_utils.hpp:134
@ eStatus_NoImpl
Command is not implemented.
Definition: nc_utils.hpp:153
@ eStatus_CondFailed
Precondition stated in command has failed (size of blob was given but data has a different size)
Definition: nc_utils.hpp:143
@ eStatus_NotAllowed
Operation not allowed with current settings (e.g.
Definition: nc_utils.hpp:132
@ eStatus_CmdAborted
Definition: nc_utils.hpp:151
@ eStatus_BadPassword
Bad password for accessing the blob.
Definition: nc_utils.hpp:125
@ eStatus_BadPeer
Peer returned something wrong.
Definition: nc_utils.hpp:155
@ eStatus_JustStarted
Command cannot be executed because NetCache didn't cache the database contents yet.
Definition: nc_utils.hpp:161
@ eStatus_ShuttingDown
operation canceled because server needs to shutdown.
Definition: nc_utils.hpp:157
string id
Definition: nc_utils.cpp:219
CNCAlerts::EAlertType type
Definition: nc_utils.cpp:218
EHTTPStatus status
Definition: nc_utils.cpp:46
const char * msg
Definition: nc_utils.cpp:47
Definition: type.c:6
Modified on Thu May 02 14:28:15 2024 by modify_doxy.py rev. 669887