ADD: added central kubernetes api class
This commit is contained in:
32
include/kubecontrol/KubernetesAPI.hpp
Normal file
32
include/kubecontrol/KubernetesAPI.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <yaml-cpp/node/node.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace kubecontrol
|
||||
{
|
||||
|
||||
class KubernetesAPI
|
||||
{
|
||||
public:
|
||||
KubernetesAPI();
|
||||
KubernetesAPI(YAML::Node config);
|
||||
|
||||
KubernetesAPI(std::string APIAddress, std::string Token);
|
||||
|
||||
std::string performRequest(std::string request,std::string Methode = "GET");
|
||||
|
||||
std::string performRequest(std::string request,std::string Methode,std::string PostFields);
|
||||
|
||||
void addAddress(std::string address);
|
||||
void addToken(std::string Token);
|
||||
void addYaml(YAML::Node config);
|
||||
private:
|
||||
std::string APIAddress_;
|
||||
std::string Token_;
|
||||
std::string Namespace_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user