Edit GetTrace and SearchTraces api.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-05-20 Version: 1.36.425
|
||||
- Edit GetTrace and SearchTraces api.
|
||||
|
||||
2020-05-20 Version: 1.36.424
|
||||
- Public beta version.
|
||||
- Add Api Overseas.
|
||||
|
||||
@@ -27,6 +27,8 @@ set(arms_public_header_model
|
||||
include/alibabacloud/arms/model/AddIntegrationResult.h
|
||||
include/alibabacloud/arms/model/CheckDataConsistencyRequest.h
|
||||
include/alibabacloud/arms/model/CheckDataConsistencyResult.h
|
||||
include/alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingRequest.h
|
||||
include/alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingResult.h
|
||||
include/alibabacloud/arms/model/CreateAlertContactRequest.h
|
||||
include/alibabacloud/arms/model/CreateAlertContactResult.h
|
||||
include/alibabacloud/arms/model/CreateAlertContactGroupRequest.h
|
||||
@@ -106,6 +108,8 @@ set(arms_src
|
||||
src/model/AddIntegrationResult.cc
|
||||
src/model/CheckDataConsistencyRequest.cc
|
||||
src/model/CheckDataConsistencyResult.cc
|
||||
src/model/CheckServiceLinkedRoleForDeletingRequest.cc
|
||||
src/model/CheckServiceLinkedRoleForDeletingResult.cc
|
||||
src/model/CreateAlertContactRequest.cc
|
||||
src/model/CreateAlertContactResult.cc
|
||||
src/model/CreateAlertContactGroupRequest.cc
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "model/AddIntegrationResult.h"
|
||||
#include "model/CheckDataConsistencyRequest.h"
|
||||
#include "model/CheckDataConsistencyResult.h"
|
||||
#include "model/CheckServiceLinkedRoleForDeletingRequest.h"
|
||||
#include "model/CheckServiceLinkedRoleForDeletingResult.h"
|
||||
#include "model/CreateAlertContactRequest.h"
|
||||
#include "model/CreateAlertContactResult.h"
|
||||
#include "model/CreateAlertContactGroupRequest.h"
|
||||
@@ -116,6 +118,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CheckDataConsistencyResult> CheckDataConsistencyOutcome;
|
||||
typedef std::future<CheckDataConsistencyOutcome> CheckDataConsistencyOutcomeCallable;
|
||||
typedef std::function<void(const ARMSClient*, const Model::CheckDataConsistencyRequest&, const CheckDataConsistencyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckDataConsistencyAsyncHandler;
|
||||
typedef Outcome<Error, Model::CheckServiceLinkedRoleForDeletingResult> CheckServiceLinkedRoleForDeletingOutcome;
|
||||
typedef std::future<CheckServiceLinkedRoleForDeletingOutcome> CheckServiceLinkedRoleForDeletingOutcomeCallable;
|
||||
typedef std::function<void(const ARMSClient*, const Model::CheckServiceLinkedRoleForDeletingRequest&, const CheckServiceLinkedRoleForDeletingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckServiceLinkedRoleForDeletingAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateAlertContactResult> CreateAlertContactOutcome;
|
||||
typedef std::future<CreateAlertContactOutcome> CreateAlertContactOutcomeCallable;
|
||||
typedef std::function<void(const ARMSClient*, const Model::CreateAlertContactRequest&, const CreateAlertContactOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAlertContactAsyncHandler;
|
||||
@@ -235,6 +240,9 @@ namespace AlibabaCloud
|
||||
CheckDataConsistencyOutcome checkDataConsistency(const Model::CheckDataConsistencyRequest &request)const;
|
||||
void checkDataConsistencyAsync(const Model::CheckDataConsistencyRequest& request, const CheckDataConsistencyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CheckDataConsistencyOutcomeCallable checkDataConsistencyCallable(const Model::CheckDataConsistencyRequest& request) const;
|
||||
CheckServiceLinkedRoleForDeletingOutcome checkServiceLinkedRoleForDeleting(const Model::CheckServiceLinkedRoleForDeletingRequest &request)const;
|
||||
void checkServiceLinkedRoleForDeletingAsync(const Model::CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CheckServiceLinkedRoleForDeletingOutcomeCallable checkServiceLinkedRoleForDeletingCallable(const Model::CheckServiceLinkedRoleForDeletingRequest& request) const;
|
||||
CreateAlertContactOutcome createAlertContact(const Model::CreateAlertContactRequest &request)const;
|
||||
void createAlertContactAsync(const Model::CreateAlertContactRequest& request, const CreateAlertContactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateAlertContactOutcomeCallable createAlertContactCallable(const Model::CreateAlertContactRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed 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 ALIBABACLOUD_ARMS_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
|
||||
#define ALIBABACLOUD_ARMS_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/arms/ARMSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace ARMS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ARMS_EXPORT CheckServiceLinkedRoleForDeletingRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CheckServiceLinkedRoleForDeletingRequest();
|
||||
~CheckServiceLinkedRoleForDeletingRequest();
|
||||
|
||||
std::string getSPIRegionId()const;
|
||||
void setSPIRegionId(const std::string& sPIRegionId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getRoleArn()const;
|
||||
void setRoleArn(const std::string& roleArn);
|
||||
std::string getDeletionTaskId()const;
|
||||
void setDeletionTaskId(const std::string& deletionTaskId);
|
||||
std::string getServiceName()const;
|
||||
void setServiceName(const std::string& serviceName);
|
||||
|
||||
private:
|
||||
std::string sPIRegionId_;
|
||||
std::string regionId_;
|
||||
std::string roleArn_;
|
||||
std::string deletionTaskId_;
|
||||
std::string serviceName_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ARMS_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed 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 ALIBABACLOUD_ARMS_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
|
||||
#define ALIBABACLOUD_ARMS_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/arms/ARMSExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace ARMS
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ARMS_EXPORT CheckServiceLinkedRoleForDeletingResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct RoleUsagesItem
|
||||
{
|
||||
std::string region;
|
||||
std::vector<std::string> resources;
|
||||
};
|
||||
|
||||
|
||||
CheckServiceLinkedRoleForDeletingResult();
|
||||
explicit CheckServiceLinkedRoleForDeletingResult(const std::string &payload);
|
||||
~CheckServiceLinkedRoleForDeletingResult();
|
||||
bool getDeletable()const;
|
||||
std::vector<RoleUsagesItem> getRoleUsages()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
bool deletable_;
|
||||
std::vector<RoleUsagesItem> roleUsages_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ARMS_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
|
||||
@@ -32,55 +32,17 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_ARMS_EXPORT GetConsistencySnapshotResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct ConsistencyResult
|
||||
{
|
||||
struct SlsShardWatermarkBean
|
||||
{
|
||||
struct CheckPointResponse
|
||||
{
|
||||
std::string consumer;
|
||||
long updateTime;
|
||||
int shard;
|
||||
std::string checkPoint;
|
||||
};
|
||||
std::string userId;
|
||||
std::vector<CheckPointResponse> checkPointResponses;
|
||||
std::string pid;
|
||||
std::vector<std::string> cursorUpdateTimes;
|
||||
std::string regionId;
|
||||
std::string appType;
|
||||
};
|
||||
struct AgentHeartbeatInfo
|
||||
{
|
||||
long startTimestamp;
|
||||
std::string agentVersion;
|
||||
std::string ip;
|
||||
std::string hostname;
|
||||
long lastHeartbeatTime;
|
||||
std::string pid;
|
||||
std::string regionId;
|
||||
std::string appType;
|
||||
std::string procId;
|
||||
};
|
||||
long lastSlsShardWatermarkTimestamp;
|
||||
long lastAgentInfoTimestamp;
|
||||
long judgeTimestamp;
|
||||
SlsShardWatermarkBean slsShardWatermarkBean;
|
||||
std::string barrierPointsLastTimestampMap;
|
||||
long lastBarrierTimestamp;
|
||||
std::vector<AgentHeartbeatInfo> agentHeartbeatInfos;
|
||||
};
|
||||
|
||||
|
||||
GetConsistencySnapshotResult();
|
||||
explicit GetConsistencySnapshotResult(const std::string &payload);
|
||||
~GetConsistencySnapshotResult();
|
||||
ConsistencyResult getConsistencyResult()const;
|
||||
std::string getConsistencyResultJsonStr()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
ConsistencyResult consistencyResult_;
|
||||
std::string consistencyResultJsonStr_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace AlibabaCloud
|
||||
std::string operationName;
|
||||
std::string serviceName;
|
||||
std::string rpcId;
|
||||
int rpcType;
|
||||
std::string traceID;
|
||||
long duration;
|
||||
std::vector<Span::TagEntry> tagEntryList;
|
||||
|
||||
@@ -159,6 +159,42 @@ ARMSClient::CheckDataConsistencyOutcomeCallable ARMSClient::checkDataConsistency
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::CheckServiceLinkedRoleForDeletingOutcome ARMSClient::checkServiceLinkedRoleForDeleting(const CheckServiceLinkedRoleForDeletingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CheckServiceLinkedRoleForDeletingOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CheckServiceLinkedRoleForDeletingOutcome(CheckServiceLinkedRoleForDeletingResult(outcome.result()));
|
||||
else
|
||||
return CheckServiceLinkedRoleForDeletingOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ARMSClient::checkServiceLinkedRoleForDeletingAsync(const CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, checkServiceLinkedRoleForDeleting(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ARMSClient::CheckServiceLinkedRoleForDeletingOutcomeCallable ARMSClient::checkServiceLinkedRoleForDeletingCallable(const CheckServiceLinkedRoleForDeletingRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CheckServiceLinkedRoleForDeletingOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->checkServiceLinkedRoleForDeleting(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ARMSClient::CreateAlertContactOutcome ARMSClient::createAlertContact(const CreateAlertContactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
84
arms/src/model/CheckServiceLinkedRoleForDeletingRequest.cc
Normal file
84
arms/src/model/CheckServiceLinkedRoleForDeletingRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingRequest.h>
|
||||
|
||||
using AlibabaCloud::ARMS::Model::CheckServiceLinkedRoleForDeletingRequest;
|
||||
|
||||
CheckServiceLinkedRoleForDeletingRequest::CheckServiceLinkedRoleForDeletingRequest() :
|
||||
RpcServiceRequest("arms", "2019-08-08", "CheckServiceLinkedRoleForDeleting")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CheckServiceLinkedRoleForDeletingRequest::~CheckServiceLinkedRoleForDeletingRequest()
|
||||
{}
|
||||
|
||||
std::string CheckServiceLinkedRoleForDeletingRequest::getSPIRegionId()const
|
||||
{
|
||||
return sPIRegionId_;
|
||||
}
|
||||
|
||||
void CheckServiceLinkedRoleForDeletingRequest::setSPIRegionId(const std::string& sPIRegionId)
|
||||
{
|
||||
sPIRegionId_ = sPIRegionId;
|
||||
setParameter("SPIRegionId", sPIRegionId);
|
||||
}
|
||||
|
||||
std::string CheckServiceLinkedRoleForDeletingRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CheckServiceLinkedRoleForDeletingRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CheckServiceLinkedRoleForDeletingRequest::getRoleArn()const
|
||||
{
|
||||
return roleArn_;
|
||||
}
|
||||
|
||||
void CheckServiceLinkedRoleForDeletingRequest::setRoleArn(const std::string& roleArn)
|
||||
{
|
||||
roleArn_ = roleArn;
|
||||
setParameter("RoleArn", roleArn);
|
||||
}
|
||||
|
||||
std::string CheckServiceLinkedRoleForDeletingRequest::getDeletionTaskId()const
|
||||
{
|
||||
return deletionTaskId_;
|
||||
}
|
||||
|
||||
void CheckServiceLinkedRoleForDeletingRequest::setDeletionTaskId(const std::string& deletionTaskId)
|
||||
{
|
||||
deletionTaskId_ = deletionTaskId;
|
||||
setParameter("DeletionTaskId", deletionTaskId);
|
||||
}
|
||||
|
||||
std::string CheckServiceLinkedRoleForDeletingRequest::getServiceName()const
|
||||
{
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void CheckServiceLinkedRoleForDeletingRequest::setServiceName(const std::string& serviceName)
|
||||
{
|
||||
serviceName_ = serviceName;
|
||||
setParameter("ServiceName", serviceName);
|
||||
}
|
||||
|
||||
67
arms/src/model/CheckServiceLinkedRoleForDeletingResult.cc
Normal file
67
arms/src/model/CheckServiceLinkedRoleForDeletingResult.cc
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/arms/model/CheckServiceLinkedRoleForDeletingResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ARMS;
|
||||
using namespace AlibabaCloud::ARMS::Model;
|
||||
|
||||
CheckServiceLinkedRoleForDeletingResult::CheckServiceLinkedRoleForDeletingResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CheckServiceLinkedRoleForDeletingResult::CheckServiceLinkedRoleForDeletingResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CheckServiceLinkedRoleForDeletingResult::~CheckServiceLinkedRoleForDeletingResult()
|
||||
{}
|
||||
|
||||
void CheckServiceLinkedRoleForDeletingResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRoleUsagesNode = value["RoleUsages"]["RoleUsagesItem"];
|
||||
for (auto valueRoleUsagesRoleUsagesItem : allRoleUsagesNode)
|
||||
{
|
||||
RoleUsagesItem roleUsagesObject;
|
||||
if(!valueRoleUsagesRoleUsagesItem["Region"].isNull())
|
||||
roleUsagesObject.region = valueRoleUsagesRoleUsagesItem["Region"].asString();
|
||||
auto allResources = value["Resources"]["Resources"];
|
||||
for (auto value : allResources)
|
||||
roleUsagesObject.resources.push_back(value.asString());
|
||||
roleUsages_.push_back(roleUsagesObject);
|
||||
}
|
||||
if(!value["Deletable"].isNull())
|
||||
deletable_ = value["Deletable"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool CheckServiceLinkedRoleForDeletingResult::getDeletable()const
|
||||
{
|
||||
return deletable_;
|
||||
}
|
||||
|
||||
std::vector<CheckServiceLinkedRoleForDeletingResult::RoleUsagesItem> CheckServiceLinkedRoleForDeletingResult::getRoleUsages()const
|
||||
{
|
||||
return roleUsages_;
|
||||
}
|
||||
|
||||
@@ -39,72 +39,13 @@ void GetConsistencySnapshotResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto consistencyResultNode = value["ConsistencyResult"];
|
||||
if(!consistencyResultNode["JudgeTimestamp"].isNull())
|
||||
consistencyResult_.judgeTimestamp = std::stol(consistencyResultNode["JudgeTimestamp"].asString());
|
||||
if(!consistencyResultNode["LastSlsShardWatermarkTimestamp"].isNull())
|
||||
consistencyResult_.lastSlsShardWatermarkTimestamp = std::stol(consistencyResultNode["LastSlsShardWatermarkTimestamp"].asString());
|
||||
if(!consistencyResultNode["LastAgentInfoTimestamp"].isNull())
|
||||
consistencyResult_.lastAgentInfoTimestamp = std::stol(consistencyResultNode["LastAgentInfoTimestamp"].asString());
|
||||
if(!consistencyResultNode["BarrierPointsLastTimestampMap"].isNull())
|
||||
consistencyResult_.barrierPointsLastTimestampMap = consistencyResultNode["BarrierPointsLastTimestampMap"].asString();
|
||||
if(!consistencyResultNode["LastBarrierTimestamp"].isNull())
|
||||
consistencyResult_.lastBarrierTimestamp = std::stol(consistencyResultNode["LastBarrierTimestamp"].asString());
|
||||
auto allAgentHeartbeatInfosNode = consistencyResultNode["AgentHeartbeatInfos"]["AgentHeartbeatInfo"];
|
||||
for (auto consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo : allAgentHeartbeatInfosNode)
|
||||
{
|
||||
ConsistencyResult::AgentHeartbeatInfo agentHeartbeatInfoObject;
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["RegionId"].isNull())
|
||||
agentHeartbeatInfoObject.regionId = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["RegionId"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["AppType"].isNull())
|
||||
agentHeartbeatInfoObject.appType = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["AppType"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["Pid"].isNull())
|
||||
agentHeartbeatInfoObject.pid = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["Pid"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["Ip"].isNull())
|
||||
agentHeartbeatInfoObject.ip = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["Ip"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["StartTimestamp"].isNull())
|
||||
agentHeartbeatInfoObject.startTimestamp = std::stol(consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["StartTimestamp"].asString());
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["Hostname"].isNull())
|
||||
agentHeartbeatInfoObject.hostname = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["Hostname"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["ProcId"].isNull())
|
||||
agentHeartbeatInfoObject.procId = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["ProcId"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["AgentVersion"].isNull())
|
||||
agentHeartbeatInfoObject.agentVersion = consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["AgentVersion"].asString();
|
||||
if(!consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["LastHeartbeatTime"].isNull())
|
||||
agentHeartbeatInfoObject.lastHeartbeatTime = std::stol(consistencyResultNodeAgentHeartbeatInfosAgentHeartbeatInfo["LastHeartbeatTime"].asString());
|
||||
consistencyResult_.agentHeartbeatInfos.push_back(agentHeartbeatInfoObject);
|
||||
}
|
||||
auto slsShardWatermarkBeanNode = consistencyResultNode["SlsShardWatermarkBean"];
|
||||
if(!slsShardWatermarkBeanNode["Pid"].isNull())
|
||||
consistencyResult_.slsShardWatermarkBean.pid = slsShardWatermarkBeanNode["Pid"].asString();
|
||||
if(!slsShardWatermarkBeanNode["UserId"].isNull())
|
||||
consistencyResult_.slsShardWatermarkBean.userId = slsShardWatermarkBeanNode["UserId"].asString();
|
||||
if(!slsShardWatermarkBeanNode["RegionId"].isNull())
|
||||
consistencyResult_.slsShardWatermarkBean.regionId = slsShardWatermarkBeanNode["RegionId"].asString();
|
||||
if(!slsShardWatermarkBeanNode["AppType"].isNull())
|
||||
consistencyResult_.slsShardWatermarkBean.appType = slsShardWatermarkBeanNode["AppType"].asString();
|
||||
auto allCheckPointResponsesNode = slsShardWatermarkBeanNode["CheckPointResponses"]["CheckPointResponse"];
|
||||
for (auto slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse : allCheckPointResponsesNode)
|
||||
{
|
||||
ConsistencyResult::SlsShardWatermarkBean::CheckPointResponse checkPointResponseObject;
|
||||
if(!slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["Shard"].isNull())
|
||||
checkPointResponseObject.shard = std::stoi(slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["Shard"].asString());
|
||||
if(!slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["CheckPoint"].isNull())
|
||||
checkPointResponseObject.checkPoint = slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["CheckPoint"].asString();
|
||||
if(!slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["UpdateTime"].isNull())
|
||||
checkPointResponseObject.updateTime = std::stol(slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["UpdateTime"].asString());
|
||||
if(!slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["Consumer"].isNull())
|
||||
checkPointResponseObject.consumer = slsShardWatermarkBeanNodeCheckPointResponsesCheckPointResponse["Consumer"].asString();
|
||||
consistencyResult_.slsShardWatermarkBean.checkPointResponses.push_back(checkPointResponseObject);
|
||||
}
|
||||
auto allCursorUpdateTimes = slsShardWatermarkBeanNode["CursorUpdateTimes"]["CursorUpdateTime"];
|
||||
for (auto value : allCursorUpdateTimes)
|
||||
consistencyResult_.slsShardWatermarkBean.cursorUpdateTimes.push_back(value.asString());
|
||||
if(!value["ConsistencyResultJsonStr"].isNull())
|
||||
consistencyResultJsonStr_ = value["ConsistencyResultJsonStr"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetConsistencySnapshotResult::ConsistencyResult GetConsistencySnapshotResult::getConsistencyResult()const
|
||||
std::string GetConsistencySnapshotResult::getConsistencyResultJsonStr()const
|
||||
{
|
||||
return consistencyResult_;
|
||||
return consistencyResultJsonStr_;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ void GetTraceResult::parse(const std::string &payload)
|
||||
spansObject.resultCode = valueSpansSpan["ResultCode"].asString();
|
||||
if(!valueSpansSpan["HaveStack"].isNull())
|
||||
spansObject.haveStack = valueSpansSpan["HaveStack"].asString() == "true";
|
||||
if(!valueSpansSpan["RpcType"].isNull())
|
||||
spansObject.rpcType = std::stoi(valueSpansSpan["RpcType"].asString());
|
||||
auto allTagEntryListNode = allSpansNode["TagEntryList"]["TagEntry"];
|
||||
for (auto allSpansNodeTagEntryListTagEntry : allTagEntryListNode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user