#pragma once #include "kubecontrol/KubernetesAPI.hpp" #include #include #include #include #include #include namespace kubecontrol { struct PodInfos { std::string UUID; std::string IP; std::string Status; std::string Component; std::string Owner; std::vector UUIDOfChilds; }; class PodController { public: PodController(std::string pathToKubectlConfig); std::string getServerAddress(); void startPod(KubePod Pod,bool WaitTillRunning = true ); void stopPod(std::string uuid); void stopAllPods(); std::vector getInfoForAllPods(); PodInfos getInfoForPod(std::string uuid); KubernetesAPI getKubernetesAPI(); private: KubernetesAPI APIInterface_; std::vector> PodList_; std::string Namespace_; std::string ApiCall_; PodInfos extractInfosFromKubePod(KubePod *pod); mutable std::mutex mx_; }; } // namespace ku