Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Clusterid string `json:"clusterId"` Clustername string `json:"clusterName"` Masternodenum string `json:"masterNodeNum"` Corenodenum string `json:"coreNodeNum"` Clusterstate string `json:"clusterState"` Createat string `json:"createAt"` Updateat string `json:"updateAt"` Billingtype string `json:"billingType"` Datacenter string `json:"dataCenter"` Vpc string `json:"vpc"` Duration string `json:"duration"` Fee string `json:"fee"` Hadoopversion string `json:"hadoopVersion"` Masternodesize string `json:"masterNodeSize"` Corenodesize string `json:"coreNodeSize"` Componentlist []Component `json:"componentList"` Externalip string `json:"externalIp"` Externalalternateip string `json:"externalAlternateIp"` Internalip string `json:"internalIp"` Deploymentid string `json:"deploymentId"` Remark string `json:"remark"` Orderid string `json:"orderId"` Azid string `json:"azId"` Masternodeproductid string `json:"masterNodeProductId"` Masternodespecid string `json:"masterNodeSpecId"` Corenodeproductid string `json:"coreNodeProductId"` Corenodespecid string `json:"coreNodeSpecId"` Azname string `json:"azName"` Instanceid string `json:"instanceId"` Vnc string `json:"vnc"` Tenantid string `json:"tenantId"` Volumesize int `json:"volumeSize"` Subnetname string `json:"subnetName"` Securitygroupsid string `json:"securityGroupsId"` Slavesecuritygroupsid string `json:"slaveSecurityGroupsId"` Safemode int `json:"safeMode"` Clusterversion string `json:"clusterVersion"` Nodepubliccertname string `json:"nodePublicCertName"` Masternodeip string `json:"masterNodeIp"` Privateipfirst string `json:"privateIpFirst"` Errorinfo string `json:"errorInfo"` Chargingstarttime string `json:"chargingStartTime"` LogCollection int `json:"log_collection"` MasterDataVolumeType string `json:"masterDataVolumeType"` MasterDataVolumeSize int `json:"masterDataVolumeSize"` MasterDataVolumeCount int `json:"masterDataVolumeCount"` CoreDataVolumeType string `json:"coreDataVolumeType"` CoreDataVolumeSize int `json:"coreDataVolumeSize"` CoreDataVolumeCount int `json:"coreDataVolumeCount"` BootstrapScripts []ScriptOpts `json:"bootstrapScripts"` }
type ClusterResult ¶
type ComponentOpts ¶
type ComponentOpts struct {
ComponentName string `json:"component_name" required:"true"`
}
type CreateOpts ¶
type CreateOpts struct { BillingType int `json:"billing_type" required:"true"` DataCenter string `json:"data_center" required:"true"` MasterNodeNum int `json:"master_node_num" required:"true"` MasterNodeSize string `json:"master_node_size" required:"true"` CoreNodeNum int `json:"core_node_num" required:"true"` CoreNodeSize string `json:"core_node_size" required:"true"` AvailableZoneID string `json:"available_zone_id" required:"true"` ClusterName string `json:"cluster_name" required:"true"` Vpc string `json:"vpc" required:"true"` VpcID string `json:"vpc_id" required:"true"` SubnetID string `json:"subnet_id" required:"true"` SubnetName string `json:"subnet_name" required:"true"` SecurityGroupsID string `json:"security_groups_id,omitempty"` ClusterVersion string `json:"cluster_version" required:"true"` ClusterType int `json:"cluster_type"` MasterDataVolumeType string `json:"master_data_volume_type,omitempty"` MasterDataVolumeSize int `json:"master_data_volume_size,omitempty"` MasterDataVolumeCount int `json:"master_data_volume_count,omitempty"` CoreDataVolumeType string `json:"core_data_volume_type,omitempty"` CoreDataVolumeSize int `json:"core_data_volume_size,omitempty"` CoreDataVolumeCount int `json:"core_data_volume_count,omitempty"` VolumeType string `json:"volume_type,omitempty"` VolumeSize int `json:"volume_size,omitempty"` SafeMode int `json:"safe_mode"` ClusterAdminSecret string `json:"cluster_admin_secret" required:"true"` LoginMode int `json:"login_mode"` ClusterMasterSecret string `json:"cluster_master_secret,omitempty"` NodePublicCertName string `json:"node_public_cert_name,omitempty"` LogCollection int `json:"log_collection,omitempty"` ComponentList []ComponentOpts `json:"component_list" required:"true"` AddJobs []JobOpts `json:"add_jobs,omitempty"` BootstrapScripts []ScriptOpts `json:"bootstrap_scripts,omitempty"` }
func (CreateOpts) ToClusterCreateMap ¶
func (opts CreateOpts) ToClusterCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*ClusterResult, error)
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
func Delete ¶
func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)
type JobOpts ¶
type JobOpts struct { JobType int `json:"job_type" required:"true"` JobName string `json:"job_name" required:"true"` JarPath string `json:"jar_path" required:"true"` Arguments string `json:"arguments,omitempty"` Input string `json:"input,omitempty"` Output string `json:"output,omitempty"` JobLog string `json:"job_log,omitempty"` ShutdownCluster bool `json:"shutdown_cluster,omitempty"` FileAction string `json:"file_action,omitempty"` SubmitJobOnceClusterRun bool `json:"submit_job_once_cluster_run" required:"true"` Hql string `json:"hql,omitempty"` HiveScriptPath string `json:"hive_script_path" required:"true"` }
type ScriptOpts ¶
type ScriptOpts struct { Name string `json:"name" required:"true"` Uri string `json:"uri" required:"true"` Parameters string `json:"parameters,omitempty"` Nodes []string `json:"nodes" required:"true"` ActiveMaster bool `json:"active_master,omitempty"` BeforeComponentStart bool `json:"before_component_start,omitempty"` FailAction string `json:"fail_action" required:"true"` }
Click to show internal directories.
Click to hide internal directories.