clusters

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List added in v0.4.0

List will list all database instances

Types

type ActionResult

type ActionResult struct {
	gophercloud.ErrResult
}

ActionResult represents result of database cluster action

func ClusterAction

func ClusterAction(client *gophercloud.ServiceClient, id string, opts OptsBuilder) (r ActionResult)

ClusterAction performs request to perform an action on the database cluster

func UpdateAutoExpand

func UpdateAutoExpand(client *gophercloud.ServiceClient, id string, opts OptsBuilder) (r ActionResult)

UpdateAutoExpand performs request to update database cluster autoresize parameters

type ApplyCapabilityOpts

type ApplyCapabilityOpts struct {
	ApplyCapability struct {
		Capabilities []instances.CapabilityOpts `json:"capabilities"`
	} `json:"apply_capability"`
}

ApplyCapabilityOpts represents parameters of capabilities to be applied to database cluster

func (*ApplyCapabilityOpts) Map

func (opts *ApplyCapabilityOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type AttachConfigurationGroupOpts

type AttachConfigurationGroupOpts struct {
	ConfigurationAttach struct {
		ConfigurationID  string `json:"configuration_id"`
		RestartConfirmed *bool  `json:"restart_confirmed"`
	} `json:"configuration_attach"`
}

AttachConfigurationGroupOpts represents parameters of configuration group to be attached to database cluster

func (*AttachConfigurationGroupOpts) Map

func (opts *AttachConfigurationGroupOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type BackupScheduleOpts

type BackupScheduleOpts struct {
	BackupSchedule *instances.BackupSchedule `json:"backup_schedule"`
}

type Cluster

type Cluster struct {
	Cluster *CreateOpts `json:"cluster" required:"true"`
}

Cluster is used to send proper request for cluster creation

func (Cluster) Map

func (opts Cluster) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type ClusterInstanceResp

type ClusterInstanceResp struct {
	СomputeInstanceID string               `json:"compute_instance_id"`
	Flavor            *instances.Links     `json:"flavor"`
	GaVersion         string               `json:"ga_version"`
	ID                string               `json:"id"`
	IP                *[]string            `json:"ip"`
	Links             *[]instances.Link    `json:"links"`
	Name              string               `json:"name"`
	Role              string               `json:"role"`
	Status            string               `json:"status"`
	Type              string               `json:"type"`
	Volume            *instances.Volume    `json:"volume"`
	WalVolume         *instances.WalVolume `json:"wal_volume"`
	ShardID           string               `json:"shard_id"`
}

ClusterInstanceResp represents database cluster instance response

type ClusterResp

type ClusterResp struct {
	ConfigurationID string                     `json:"configuration_id"`
	Created         db.DateTimeWithoutTZFormat `json:"created"`
	DataStore       *datastores.DatastoreShort `json:"datastore"`
	HealthStatus    string                     `json:"health_status"`
	ID              string                     `json:"id"`
	Instances       []ClusterInstanceResp      `json:"instances"`
	Links           *[]instances.Link          `json:"links"`
	LoadbalancerID  string                     `json:"loadbalancer_id"`
	Name            string                     `json:"name"`
	Task            Task                       `json:"task"`
	Updated         db.DateTimeWithoutTZFormat `json:"updated"`
	AutoExpand      int                        `json:"volume_autoresize_enabled"`
	MaxDiskSize     int                        `json:"volume_autoresize_max_size"`
	WalAutoExpand   int                        `json:"wal_autoresize_enabled"`
	WalMaxDiskSize  int                        `json:"wal_autoresize_max_size"`
}

ClusterResp represents database cluster response

func ExtractClusters added in v0.4.0

func ExtractClusters(r pagination.Page) ([]ClusterResp, error)

ExtractClusters retrieves a slice of database clusterResp structs from a paginated collection.

type ClusterRespOpts

type ClusterRespOpts struct {
	Cluster *ClusterResp `json:"cluster"`
}

ClusterRespOpts is used to properly extract database cluster response

type ClusterShortResp

type ClusterShortResp struct {
	ID string `json:"id"`
}

type ClusterShortRespOpts

type ClusterShortRespOpts struct {
	Cluster *ClusterShortResp `json:"cluster"`
}

type CreateOpts

type CreateOpts struct {
	Name                   string                     `json:"name" required:"true"`
	Datastore              *datastores.DatastoreShort `json:"datastore" required:"true"`
	FloatingIPEnabled      bool                       `json:"allow_remote_access,omitempty"`
	AutoExpand             int                        `json:"volume_autoresize_enabled,omitempty"`
	MaxDiskSize            int                        `json:"volume_autoresize_max_size,omitempty"`
	WalAutoExpand          int                        `json:"wal_autoresize_enabled,omitempty"`
	WalMaxDiskSize         int                        `json:"wal_autoresize_max_size,omitempty"`
	Instances              []InstanceCreateOpts       `json:"instances"`
	Capabilities           []instances.CapabilityOpts `json:"capabilities,omitempty"`
	RestorePoint           *instances.RestorePoint    `json:"restorePoint,omitempty"`
	BackupSchedule         *instances.BackupSchedule  `json:"backup_schedule,omitempty"`
	CloudMonitoringEnabled bool                       `json:"cloud_monitoring_enabled,omitempty"`
}

CreateOpts represents database cluster creation parameters

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult represents result of database cluster create

func Create

func Create(client *gophercloud.ServiceClient, opts OptsBuilder) (r CreateResult)

Create performs request to create database cluster

func (CreateResult) Extract

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

Extract is used to extract result into short response struct

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

func Delete

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

type DetachConfigurationGroupOpts

type DetachConfigurationGroupOpts struct {
	ConfigurationDetach struct {
		ConfigurationID  string `json:"configuration_id"`
		RestartConfirmed *bool  `json:"restart_confirmed"`
	} `json:"configuration_detach"`
}

DetachConfigurationGroupOpts represents parameters of configuration group to be detached from database cluster

func (*DetachConfigurationGroupOpts) Map

func (opts *DetachConfigurationGroupOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type GetBackupScheduleResult

type GetBackupScheduleResult struct {
	// contains filtered or unexported fields
}

func GetBackupSchedule

func GetBackupSchedule(client *gophercloud.ServiceClient, id string) (r GetBackupScheduleResult)

func (GetBackupScheduleResult) Extract

func (r GetBackupScheduleResult) Extract() (*instances.BackupSchedule, error)

Extract is used to extract result into response struct

type GetCapabilitiesResult

type GetCapabilitiesResult struct {
	// contains filtered or unexported fields
}

func GetCapabilities

func GetCapabilities(client *gophercloud.ServiceClient, id string) (r GetCapabilitiesResult)

func (GetCapabilitiesResult) Extract

func (r GetCapabilitiesResult) Extract() ([]instances.DatabaseCapability, error)

type GetCapabilityOpts

type GetCapabilityOpts struct {
	Capabilities []instances.DatabaseCapability `json:"capabilities"`
}

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult represents result of database cluster get

func Get

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

Get performs request to get database cluster

func (GetResult) Extract

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

Extract is used to extract result into response struct

type GrowClusterOpts

type GrowClusterOpts struct {
	Grow []GrowOpts `json:"grow"`
}

GrowClusterOpts is used to send proper request to grow cluster

func (*GrowClusterOpts) Map

func (opts *GrowClusterOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type GrowOpts

type GrowOpts struct {
	Keypair          string               `json:"key_name"`
	AvailabilityZone string               `json:"availability_zone" required:"true"`
	FlavorRef        string               `json:"flavorRef" required:"true"`
	Volume           *instances.Volume    `json:"volume" required:"true"`
	Walvolume        *instances.WalVolume `json:"wal_volume,omitempty"`
	ShardID          string               `json:"shard_id,omitempty"`
}

GrowOpts represents parameters of growing cluster

type InstanceCreateOpts

type InstanceCreateOpts struct {
	Keypair          string                  `json:"key_name,omitempty"`
	AvailabilityZone string                  `json:"availability_zone,omitempty"`
	FlavorRef        string                  `json:"flavorRef,omitempty" mapstructure:"flavor_id"`
	Nics             []instances.NetworkOpts `json:"nics" required:"true"`
	Volume           *instances.Volume       `json:"volume" required:"true"`
	Walvolume        *instances.WalVolume    `json:"wal_volume,omitempty"`
	ShardID          string                  `json:"shard_id,omitempty"`
	SecurityGroups   []string                `json:"security_groups,omitempty"`
}

InstanceCreateOpts represents database cluster instance creation parameters

type OptsBuilder

type OptsBuilder interface {
	Map() (map[string]interface{}, error)
}

type Page added in v0.4.0

type Page struct {
	pagination.SinglePageBase
}

Page represents a page of database clusters

func (Page) IsEmpty added in v0.4.0

func (r Page) IsEmpty() (bool, error)

IsEmpty indicates whether a database cluster collection is empty.

type ResizeOpts

type ResizeOpts struct {
	Resize struct {
		FlavorRef string `json:"flavorRef"`
		ShardID   string `json:"shard_id,omitempty"`
	} `json:"resize"`
}

ResizeOpts represents database cluster resize parameters

func (*ResizeOpts) Map

func (opts *ResizeOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type ResizeVolumeOpts

type ResizeVolumeOpts struct {
	Resize struct {
		Volume struct {
			Size int `json:"size"`
		} `json:"volume"`
		ShardID string `json:"shard_id,omitempty"`
	} `json:"resize"`
}

ResizeVolumeOpts represents parameters of volume resize of database cluster

func (*ResizeVolumeOpts) Map

func (opts *ResizeVolumeOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type ResizeWalVolumeOpts

type ResizeWalVolumeOpts struct {
	Resize struct {
		Volume struct {
			Size int    `json:"size"`
			Kind string `json:"kind"`
		} `json:"volume"`
		ShardID string `json:"shard_id,omitempty"`
	} `json:"resize"`
}

ResizeWalVolumeOpts represents parameters of wal volume resize of database cluster

func (*ResizeWalVolumeOpts) Map

func (opts *ResizeWalVolumeOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type ShrinkClusterOpts

type ShrinkClusterOpts struct {
	Shrink []ShrinkOpts `json:"shrink"`
}

ShrinkClusterOpts is used to send proper request to shrink database cluster

func (*ShrinkClusterOpts) Map

func (opts *ShrinkClusterOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type ShrinkOpts

type ShrinkOpts struct {
	ID string `json:"id" required:"true"`
}

ClusterShrinkOpts represents parameters of shrinking database cluster

type Task

type Task struct {
	Description string `json:"description"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
}

Task represents database cluster task

type UpdateAutoExpandOpts

type UpdateAutoExpandOpts struct {
	Cluster struct {
		VolumeAutoresizeEnabled int `json:"volume_autoresize_enabled"`
		VolumeAutoresizeMaxSize int `json:"volume_autoresize_max_size"`
	} `json:"cluster"`
}

UpdateAutoExpandOpts represents autoresize parameters of volume of database cluster

func (*UpdateAutoExpandOpts) Map

func (opts *UpdateAutoExpandOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type UpdateAutoExpandWalOpts

type UpdateAutoExpandWalOpts struct {
	Cluster struct {
		WalVolume struct {
			VolumeAutoresizeEnabled int `json:"autoresize_enabled"`
			VolumeAutoresizeMaxSize int `json:"autoresize_max_size"`
		} `json:"wal_volume"`
	} `json:"cluster"`
}

UpdateAutoExpandWalOpts represents autoresize parameters of wal volume of database cluster

func (*UpdateAutoExpandWalOpts) Map

func (opts *UpdateAutoExpandWalOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

type UpdateBackupScheduleResult

type UpdateBackupScheduleResult struct {
	gophercloud.ErrResult
}

func UpdateBackupSchedule

func UpdateBackupSchedule(client *gophercloud.ServiceClient, id string, opts OptsBuilder) (r UpdateBackupScheduleResult)

type UpdateCloudMonitoringOpts

type UpdateCloudMonitoringOpts struct {
	CloudMonitoring struct {
		Enable bool `json:"enable"`
	} `json:"cloud_monitoring"`
}

UpdateCloudMonitoringOpts represents parameters of request to update cloud monitoring options

func (*UpdateCloudMonitoringOpts) Map

func (opts *UpdateCloudMonitoringOpts) Map() (map[string]interface{}, error)

Map converts opts to a map (for a request body)

Jump to

Keyboard shortcuts

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