Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, id string) (err error)
- func DownloadCertificate(client *golangsdk.ServiceClient, clusterID string) (string, error)
- func WaitForClusterOperationSucces(client *golangsdk.ServiceClient, id string, timeout int) error
- func WaitForClusterToExtend(client *golangsdk.ServiceClient, id string, timeout int) error
- type BackupStrategy
- type Cluster
- type ClusterExtendCommonOpts
- type ClusterExtendOptsBuilder
- type ClusterExtendSpecialOpts
- type CreateOpts
- type CreatedCluster
- type Datastore
- type DiskEncryption
- type ExtendedCluster
- type ExtendedInstance
- type FailedReasons
- type Instance
- type InstanceSpec
- type Nics
- type PublicKibana
- type PublicNetwork
- type ShowClusterVolume
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadCertificate ¶
func WaitForClusterOperationSucces ¶
func WaitForClusterOperationSucces(client *golangsdk.ServiceClient, id string, timeout int) error
func WaitForClusterToExtend ¶
func WaitForClusterToExtend(client *golangsdk.ServiceClient, id string, timeout int) error
Types ¶
type BackupStrategy ¶
type BackupStrategy struct { // Period - time when a snapshot is created every day. // Snapshots can only be created on the hour. // The time format is the time followed by the time zone, specifically, `HH:mm z`. // In the format, `HH:mm` refers to the hour time and `z` refers to the time zone, for example, // `00:00 GMT+08:00` and `01:00 GMT+08:00`. Period string `json:"period" required:"true"` // Prefix - prefix of the name of the snapshot that is automatically created. Prefix string `json:"prefix" required:"true"` // KeepDay - number of days for which automatically created snapshots are reserved. // Value range: `1` to `90` KeepDay int `json:"keepday" required:"true"` }
type Cluster ¶
type Cluster struct { Datastore Datastore `json:"datastore"` Instances []Instance `json:"instances"` Updated string `json:"updated"` Name string `json:"name"` Created string `json:"created"` ID string `json:"id"` Status string `json:"status"` Endpoint string `json:"endpoint"` ActionProgress map[string]string `json:"actionProgress"` Actions []string `json:"actions"` FailedReasons *FailedReasons `json:"failed_reasons"` HttpsEnabled bool `json:"httpsEnable"` AuthorityEnabled bool `json:"authorityEnable"` DiskEncrypted bool `json:"diskEncrypted"` CmkID string `json:"cmkId"` VpcID string `json:"vpcId"` SubnetID string `json:"subnetId"` SecurityGroupID string `json:"securityGroupId"` Tags []tags.ResourceTag `json:"tags"` PublicKibana *PublicKibana `json:"publicKibanaResp"` PublicNetwork *PublicNetwork `json:"elbWhiteList"` PublicIp string `json:"publicIp"` VpcEpIp string `json:"vpcepIp"` BandwidthSize int `json:"bandwidthSize"` BackupAvailable bool `json:"backupAvailable"` }
type ClusterExtendCommonOpts ¶
type ClusterExtendCommonOpts struct { // ModifySize - number of instances to be added. ModifySize int `json:"modifySize"` }
ClusterExtendCommonOpts is used to extend cluster with only `common` nodes. Clusters with master, client, or cold data nodes cannot use this.
type ClusterExtendOptsBuilder ¶
type ClusterExtendOptsBuilder interface { }
type ClusterExtendSpecialOpts ¶
type ClusterExtendSpecialOpts struct { // Type of the instance to be scaled out. // Select at least one from `ess`, `ess-cold`, `ess-master`, and `ess-client`. // You can only add instances, rather than increase storage capacity, on nodes of the `ess-master` and `ess-client` types. Type string `json:"type"` // NodeSize - number of instances to be scaled out. // The total number of existing instances and newly added instances in a cluster cannot exceed 32. NodeSize int `json:"nodesize"` // DiskSize - Storage capacity of the instance to be expanded. // The total storage capacity of existing instances and newly added instances in a cluster cannot exceed the maximum instance storage capacity allowed when a cluster is being created. // In addition, you can expand the instance storage capacity for a cluster for up to six times. // Unit: GB DiskSize int `json:"disksize"` }
ClusterExtendSpecialOpts is used to extend cluster with special nodes. If a cluster has master, client, or cold data nodes, this should be used
type CreateOpts ¶
type CreateOpts struct { // Instance - instance specification Instance *InstanceSpec `json:"instance" required:"true"` // Datastore - type of the data search engine Datastore *Datastore `json:"datastore,omitempty"` // Name - cluster name. // It contains 4 to 32 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. // The value must start with a letter. Name string `json:"name" required:"true"` // InstanceNum - number of clusters. The value range is 1 to 32. InstanceNum int `json:"instanceNum" required:"true"` // BackupStrategy - configuration of automatic snapshot creation. // This function is enabled by default. BackupStrategy *BackupStrategy `json:"backupStrategy,omitempty"` // DiskEncryption - disk encryption configuration DiskEncryption *DiskEncryption `json:"diskEncryption" required:"true"` // HttpsEnabled - whether communication is not encrypted on the cluster. HttpsEnabled string `json:"httpsEnable,omitempty"` // AuthorityEnabled - whether to enable authentication. // Available values include `true` and `false`. Authentication is disabled by default. // When authentication is enabled, `HttpsEnabled` must be set to `true`. AuthorityEnabled bool `json:"authorityEnable,omitempty"` // AdminPassword - password of the cluster user `admin` in security mode. // This parameter is mandatory only when `AuthorityEnabled` is set to `true`. AdminPassword string `json:"adminPwd,omitempty"` // Tags - tags of a cluster. Tags []tags.ResourceTag `json:"tags,omitempty"` }
type CreatedCluster ¶
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CreatedCluster, error)
type DiskEncryption ¶
type DiskEncryption struct { // SystemEncrypted - value `1` indicates encryption is performed, and value `0` indicates encryption is not performed. // Boolean sucks. Encrypted string `json:"systemEncrypted" required:"true"` // Key ID. // - The Default Master Keys cannot be used to create grants. // Specifically, you cannot use Default Master Keys whose aliases end with `/default` in KMS to create clusters. // - After a cluster is created, do not delete the key used by the cluster. Otherwise, the cluster will become unavailable. CmkID string `json:"systemCmkid"` }
type ExtendedCluster ¶
type ExtendedCluster struct { ID string `json:"id"` Instances []ExtendedInstance `json:"instances"` }
func ExtendCluster ¶
func ExtendCluster(client *golangsdk.ServiceClient, clusterID string, opts ClusterExtendOptsBuilder) (*ExtendedCluster, error)
ExtendCluster - extends cluster capacity. ClusterExtendCommonOpts should be used as options to extend cluster with only `common` nodes. ClusterExtendSpecialOpts should be used if extended cluster has master, client, or cold data nodes.
type ExtendedInstance ¶
type FailedReasons ¶
type InstanceSpec ¶
type InstanceSpec struct { // Flavor - instance flavor name. Flavor string `json:"flavorRef" required:"true"` // Volume - information about the volume. Volume *Volume `json:"volume" required:"true"` // Nics - subnet information. Nics *Nics `json:"nics" required:"true"` AvailabilityZone string `json:"availability_zone,omitempty"` }
type Nics ¶
type Nics struct { // VpcID - VPC ID which is used for configuring cluster network. VpcID string `json:"vpcId" required:"true"` // SubnetID - Subnet ID. // All instances in a cluster must have the same subnet. SubnetID string `json:"netId" required:"true"` // SecurityGroupID - Security group ID. // All instances in a cluster must have the same security grou. SecurityGroupID string `json:"securityGroupId" required:"true"` }
type PublicKibana ¶ added in v0.6.1
type PublicKibana struct { // Bandwidth range. Unit: Mbit/s Bandwidth int `json:"eipSize"` // Kibana public network access information. ElbWhiteList *PublicNetwork `json:"elbWhiteListResp"` // Specifies the IP address for accessing Kibana. PublicIp string `json:"publicKibanaIp"` }
type PublicNetwork ¶ added in v0.6.1
type PublicNetwork struct { // Whether the public network access control is enabled. // true: Public network access control is enabled. // false: Public network access control is disabled. Enabled bool `json:"enableWhiteList"` // Whitelist of public network for accessing Kibana. Whitelist string `json:"whiteList"` }
type ShowClusterVolume ¶ added in v0.6.1
Source Files ¶
Click to show internal directories.
Click to hide internal directories.