ADD: added podinfo with building a tree hierarchy for a pod

This commit is contained in:
Henry Winkel
2023-08-16 14:42:00 +02:00
parent 6c2f8f1eb6
commit 89465f06a5
8 changed files with 474 additions and 48 deletions

View File

@@ -1,5 +1,9 @@
#pragma once
#include "kubecontrol/PodInfo.hpp"
#include <kubecontrol/KubePod.hpp>
#include <memory>
#include <string>
#include <vector>
namespace kubecontrol
{
@@ -15,14 +19,28 @@ namespace kubecontrol
void stopAllPods();
std::string getPodsInfo();
std::string getInfoForOwnPod();
std::string getInfoForPod(std::string Label);
void checkPodsHierarchy();
std::string getPodsInfoForAll();
private:
std::vector<KubePod> PodList_;
std::string performRequest(std::string url);
void performForceStopRequest(std::string uuid);
std::string BearerToken_;
std::string ServerAddress_;
std::string ApiCall_;
// void addPodInfoToInfoList(std::shared_ptr<PodInfo> podinfo);
std::shared_ptr<PodInfo> getPodInfo(std::string uuid);
std::vector<std::shared_ptr<PodInfo>> podsInfoList_;
};
} // namespace ku