cluster

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (err error)

Types

type ActionProgress

type ActionProgress struct {
	Creating     string `json:"creating"`
	Growing      string `json:"growing"`
	Restoring    string `json:"restoring"`
	Snapshotting string `json:"snapshotting"`
	Repairing    string `json:"repairing"`
}

type Cluster

type Cluster struct {
	ScheduleBootTime   string            `json:"scheduleBootTime,omitempty"`
	IsScheduleBootOff  *bool             `json:"isScheduleBootOff,omitempty"`
	Instances          []Instance        `json:"instances,omitempty"`
	DataStore          *Datastore        `json:"datastore,omitempty"`
	ExtendedProperties *ExtendedProp     `json:"extended_properties,omitempty"`
	ScheduleOffTime    string            `json:"scheduleOffTime,omitempty"`
	VpcId              string            `json:"vpcId,omitempty"`
	Name               string            `json:"name,omitempty"`
	SysTags            []tag.ResourceTag `json:"sys_tags,omitempty"`
	IsAutoOff          *bool             `json:"isAutoOff"`
}
type ClusterLinks struct {
	Rel  string `json:"rel"`
	Href string `json:"href"`
}

type ClusterQuery

type ClusterQuery struct {
	PublicEndpoint           string               `json:"public_endpoint"`
	Instances                []DetailedInstances  `json:"instances"`
	SecurityGroupId          string               `json:"security_group_id"`
	SubnetId                 string               `json:"subnet_id"`
	VpcId                    string               `json:"vpc_id"`
	CustomerConfig           CustomerConfig       `json:"customerConfig"`
	Datastore                Datastore            `json:"datastore"`
	IsAutoOff                bool                 `json:"isAutoOff"`
	PublicEndpointDomainName string               `json:"publicEndpointDomainName"`
	BakExpectedStartTime     string               `json:"bakExpectedStartTime"`
	BakKeepDay               string               `json:"bakKeepDay"`
	MaintainWindow           MaintainWindow       `json:"maintainWindow"`
	RecentEvent              int                  `json:"recentEvent"`
	FlavorName               string               `json:"flavorName"`
	AzName                   string               `json:"azName"`
	EndpointDomainName       string               `json:"endpointDomainName"`
	PublicEndpointStatus     PublicEndpointStatus `json:"publicEndpointStatus"`
	IsScheduleBootOff        bool                 `json:"isScheduleBootOff"`
	Namespace                string               `json:"namespace"`
	EipId                    string               `json:"eipId"`
	FailedReasons            FailedReasons        `json:"failedReasons"`
	DbUser                   string               `json:"dbuser"`
	Links                    []ClusterLinks       `json:"links"`
	ClusterMode              string               `json:"clusterMode"`
	Task                     ClusterTask          `json:"task"`
	Created                  string               `json:"created"`
	StatusDetail             string               `json:"statusDetail"`
	ConfigStatus             string               `json:"config_status"`
	ActionProgress           ActionProgress       `json:"actionProgress"`
	Name                     string               `json:"name"`
	Id                       string               `json:"id"`
	IsFrozen                 string               `json:"isFrozen"`
	Actions                  []string             `json:"actions"`
	Updated                  string               `json:"updated"`
	Status                   string               `json:"status"`
}

func Get

func Get(client *golangsdk.ServiceClient, clusterId string) (*ClusterQuery, error)

type ClusterResponse

type ClusterResponse struct {
	Name      string         `json:"name"`
	Id        string         `json:"id"`
	Task      Task           `json:"task"`
	Datastore Datastore      `json:"datastore"`
	Instances []InstanceResp `json:"instances"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*ClusterResponse, error)

type ClusterTask

type ClusterTask struct {
	Description string `json:"description"`
	Name        string `json:"name"`
	Id          string `json:"id"`
}

type CreateFailed

type CreateFailed struct {
	ErrorMsg  string `json:"errorMsg"`
	ErrorCode string `json:"errorCode"`
}

type CreateOpts

type CreateOpts struct {
	Cluster    Cluster `json:"cluster" required:"true"`
	AutoRemind *bool   `json:"auto_remind,omitempty"`
	PhoneNum   string  `json:"phone_num,omitempty"`
	Email      string  `json:"email,omitempty"`
}

type CustomerConfig

type CustomerConfig struct {
	FailureRemind   string `json:"failureRemind"`
	ClusterName     string `json:"clusterName"`
	ServiceProvider string `json:"serviceProvider"`
	LocalDisk       string `json:"localDisk"`
	Ssl             string `json:"ssl"`
	CreateFrom      string `json:"createFrom"`
	ResourceId      string `json:"resourceId"`
	FlavorType      string `json:"flavorType"`
	WorkSpaceId     string `json:"workSpaceId"`
	Trial           string `json:"trial"`
}

type Datastore

type Datastore struct {
	Type    string `json:"type,omitempty"`
	Version string `json:"version,omitempty"`
}

type DetailedInstances

type DetailedInstances struct {
	Flavor        Flavor         `json:"flavor"`
	Volume        Volume         `json:"volume"`
	Status        string         `json:"status"`
	Actions       []string       `json:"actions"`
	Type          string         `json:"string"`
	Name          string         `json:"name"`
	Id            string         `json:"id"`
	IsFrozen      string         `json:"isFrozen"`
	Components    string         `json:"components"`
	ConfigStatus  string         `json:"config_status"`
	Role          string         `json:"role"`
	Group         string         `json:"group"`
	Links         []ClusterLinks `json:"links"`
	ParamsGroupId string         `json:"paramsGroupId"`
	PublicIp      string         `json:"publicIp"`
	ManageIp      string         `json:"manageIp"`
	TrafficIp     string         `json:"trafficIp"`
	ShardId       string         `json:"shard_id"`
	ManageFixIp   string         `json:"manage_fix_ip"`
	PrivateIp     string         `json:"private_ip"`
	InternalIp    string         `json:"internal_ip"`
	Resource      []Resource     `json:"resource"`
}

type EmptyObj

type EmptyObj struct {
	Obj *string `json:"-"`
}

type ExtendedProp

type ExtendedProp struct {
	WorkSpaceId string `json:"workSpaceId,omitempty"`
	ResourceId  string `json:"resourceId,omitempty"`
	Trial       string `json:"trial,omitempty"`
}

type FailedReasons

type FailedReasons struct {
	CreateFailed CreateFailed `json:"CREATE_FAILED"`
}

type Flavor

type Flavor struct {
	Id    string         `json:"id"`
	Links []ClusterLinks `json:"links"`
}

type Instance

type Instance struct {
	AZ        string `json:"availability_zone" required:"true"`
	Nics      []Nic  `json:"nics" required:"true"`
	FlavorRef string `json:"flavorRef" required:"true"`
	Type      string `json:"type" required:"true"`
}

type InstanceResp

type InstanceResp struct {
	Name    string `json:"name"`
	Id      string `json:"id"`
	Type    string `json:"type"`
	ShardId string `json:"shard_id"`
}

type JobId

type JobId struct {
	JobId []string `json:"jobId"`
}

func Restart

func Restart(client *golangsdk.ServiceClient, opts RestartOpts) (*JobId, error)

func Start

func Start(client *golangsdk.ServiceClient, id string) (*JobId, error)

func Stop

func Stop(client *golangsdk.ServiceClient, opts StopOpts) (*JobId, error)

type MaintainWindow

type MaintainWindow struct {
	Dat       string `json:"day"`
	StartTime string `json:"startTime"`
	EndTime   string `json:"endTime"`
}

type Nic

type Nic struct {
	SecurityGroupId string `json:"securityGroupId" required:"true"`
	NetId           string `json:"net-id" required:"true"`
}

type PublicEndpointStatus

type PublicEndpointStatus struct {
	Status       string `json:"status"`
	ErrorMessage string `json:"errorMessage"`
}

type Resource

type Resource struct {
	ResourceId   string `json:"resource_id"`
	ResourceType string `json:"resource_type"`
}

type RestartOpts

type RestartOpts struct {
	Id      string        `json:"-"`
	Restart RestartStruct `json:"restart" required:"true"`
}

type RestartStruct

type RestartStruct struct {
	StopMode     int    `json:"restartDelayTime,omitempty"`
	RestartMode  string `json:"restartMode,omitempty"`
	RestartLevel string `json:"restartLevel,omitempty"`
	Type         string `json:"type,omitempty"`
	Instance     string `json:"instance,omitempty"`
	Group        string `json:"group,omitempty"`
}

type StopOpts

type StopOpts struct {
	Id   string     `json:"-"`
	Stop StopStruct `json:"stop" required:"true"`
}

type StopStruct

type StopStruct struct {
	StopMode  string `json:"stopMode,omitempty"`
	DelayTime string `json:"delayTime,omitempty"`
}

type Task

type Task struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type Volume

type Volume struct {
	Type string `json:"type"`
	Size int64  `json:"size"`
}

Jump to

Keyboard shortcuts

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