Help us shape the future of Go! Take the 2026 Go Developer Survey

cluster

package
v0.5.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	TotalNodeNum          string         `json:"totalNodeNum"`
	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"`
	StageDesc             string         `json:"stageDesc"`
	MrsManagerFinish      bool           `json:"mrsManagerFinish"`
	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"`
	ClusterType           int            `json:"clusterType"`
	LogCollection         int            `json:"logCollection"`
	MasterDataVolumeType  string         `json:"masterDataVolumeType"`
	MasterDataVolumeSize  int            `json:"masterDataVolumeSize"`
	MasterDataVolumeCount int            `json:"masterDataVolumeCount"`
	CoreDataVolumeType    string         `json:"coreDataVolumeType"`
	CoreDataVolumeSize    int            `json:"coreDataVolumeSize"`
	CoreDataVolumeCount   int            `json:"coreDataVolumeCount"`
	Scale                 string         `json:"scale"`
	BootstrapScripts      []ScriptResult `json:"bootstrapScripts"`
}

type Component

type Component struct {
	ComponentID      string `json:"componentId"`
	ComponentName    string `json:"componentName"`
	ComponentVersion string `json:"componentVersion"`
	ComponentDesc    string `json:"componentDesc"`
}

type ComponentOpts

type ComponentOpts struct {
	ComponentName string `json:"component_name" required:"true"`
}

func ExpandComponent added in v0.5.7

func ExpandComponent(strComponents []string) []ComponentOpts

type CreateClusterResult added in v0.5.7

type CreateClusterResult struct {
	ClusterID string `json:"cluster_id"`
	Result    bool   `json:"result"`
	Msg       string `json:"msg"`
}

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,omitempty"`
	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" required:"true"`
	ClusterAdminSecret    string          `json:"cluster_admin_secret" required:"true"`
	LoginMode             int             `json:"login_mode" required:"true"`
	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 CreateOptsBuilder interface {
	ToClusterCreateMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	golangsdk.Result
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*CreateClusterResult, error)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*Cluster, error)

type JobOpts

type JobOpts struct {
	JobType                 int    `json:"job_type" required:"true"`
	JobName                 string `json:"job_name" required:"true"`
	JarPath                 string `json:"jar_path,omitempty"`
	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"`
}

type ScriptResult added in v0.5.7

type ScriptResult struct {
	Name                 string   `json:"name"`
	Uri                  string   `json:"uri"`
	Parameters           string   `json:"parameters"`
	Nodes                []string `json:"nodes"`
	ActiveMaster         bool     `json:"active_master"`
	BeforeComponentStart bool     `json:"before_component_start"`
	FailAction           string   `json:"fail_action"`
	StartTime            int      `json:"start_time"`
	State                string   `json:"state"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL