Documentation
¶
Index ¶
- Variables
- func CreateDir(target string, mode int) error
- func DoRequest(req *CloudRequest) (resp *http.Response, err error)
- func DownloadFile(url, filepath, name string)
- func FileExisted(filename string) bool
- func HttpGet(url string) ([]byte, error)
- func ImagePullAndTag(imageSlice []string) ([]string, error)
- func InstallPkgs(pkgs []string, group bool) ([]string, error)
- func MarshalJsonToIOReader(v interface{}) (io.Reader, error)
- func RunCommand(cmd string) (string, error)
- func SendRequest(method, url string, data_bytes []byte, headers []string) ([]byte, error)
- type BaseResponse
- type CloudRequest
- type InitData
- type K8sV17Config
- type TargetDef
- type TunnelGetResponse
- type TunnelInitResponse
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DownloadFile ¶
func DownloadFile(url, filepath, name string)
func FileExisted ¶
FileExisted checks if a file or directory exists
func ImagePullAndTag ¶
func MarshalJsonToIOReader ¶
Types ¶
type BaseResponse ¶
type CloudRequest ¶
type CloudRequest struct {
// contains filtered or unexported fields
}
func NewCCKRequest ¶
func NewRequest ¶
type K8sV17Config ¶
type K8sV17Config struct {
K8sInstall k8s
SystemConfig config
YumConfig yum
PythonInstall python
DockerInstall docker
DockerImages images
NetworkConfig network
}
type TargetDef ¶
type TargetDef struct {
Version string `json: "version"`
Download_url string `json: "download_url"`
Checksum_md5_url string `json: "checksum_md5_url"`
Checksum_sha256_url string `json: "checksum_sha256_url"`
}
noinspection ALL
type TunnelGetResponse ¶
type TunnelGetResponse struct {
BaseResponse
Data struct {
NodeID string `json:"node_id"`
TunnelAddress string `json:"tunnel_address"`
TunnelPort string `json:"tunnel_port"`
IdRsaPub string `json:"id_rsa_pub"`
Token string `json:"token"`
Version string `json:"version"`
ServerPort string `json:"server_port"`
ImageUrl string `json:"image_url"`
} `json:"data"`
}
type TunnelInitResponse ¶
type TunnelInitResponse struct {
BaseResponse
Data struct {
ClusterID string `json:"cluster_id"`
TaskId string `json:"task_id"`
} `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.