Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociateQueueOpts ¶
type AssociateQueueOpts struct { // The name of the elastic resource pool. ElasticResourcePoolName string `json:"-" required:"true"` // The name of queue. QueueName string `json:"queue_name" required:"true"` }
AssociateQueueOpts is the structure that used to associate a queue with an elastic resource pool.
type AssociateQueueResp ¶
type AssociateQueueResp struct { // Whether the request is successfully sent. Value true indicates that the request is successfully sent. IsSuccess bool `json:"is_success"` // System prompt. If execution succeeds, the parameter setting may be left blank. Message string `json:"message"` }
AssociateQueueResp is the structure that represents response of the AssociateElasticResourcePool or UpdateElasticResourcePoolQueuePolicy method.
func AssociateQueue ¶
func AssociateQueue(c *golangsdk.ServiceClient, opts AssociateQueueOpts) (*AssociateQueueResp, error)
AssociateQueue is a method to associate a queue with an elastic resource pool using given parameters.
func UpdateElasticResourcePoolQueuePolicy ¶
func UpdateElasticResourcePoolQueuePolicy(c *golangsdk.ServiceClient, opts UpdateQueuePolicyOpts) (*AssociateQueueResp, error)
UpdateElasticResourcePoolQueuePolicy is a method to modify the scaling policy of the queue associated with specified elastic resource pool using given parameters.
type ListElasticResourcePoolQueuesOpts ¶
type ListElasticResourcePoolQueuesOpts struct { // The name of the elastic resource pool. ElasticResourcePoolName string `json:"-" required:"true"` // The name of the queue. QueueName string `q:"queue_name"` // Offset from which the query starts. Default to 0. Offset int `q:"offset"` // The number of items displayed on each page. Default to 100. Limit int `q:"limit"` }
ListElasticResourcePoolQueuesOpts is the structure used to query the list of queue scaling policies in an elastic resource pool.
type Queue ¶
type Queue struct { // The queue name. QueueName string `json:"queue_name"` // The enterprise project ID of the queue. EnterpriseProjectId string `json:"enterprise_project_id"` // The queue type. QueueType string `json:"queue_type"` // The list of scaling policies of the queue. QueueScalingPolicies []QueueScalingPolicy `json:"queue_scaling_policies"` // The owner of the queue. Owner string `json:"owner"` // Tht creation time of the queue. CreatedAt int `json:"create_time"` // The engine type ot the queue. Engine string `json:"engine"` }
QueuesResp is the structure that represents the queue detail associated with the specified elastic resource pool.
func ExtractQueues ¶
func ExtractQueues(r pagination.Page) ([]Queue, error)
ExtractQueues is a method to extract the list of queues associated with elastic resource pool.
func ListElasticResourcePoolQueues ¶
func ListElasticResourcePoolQueues(c *golangsdk.ServiceClient, opts ListElasticResourcePoolQueuesOpts) ([]Queue, error)
ListElasticResourcePoolQueues is a method to query all queue scaling policies in an elastic resource pool using given parameters.
type QueuePage ¶
type QueuePage struct {
pagination.OffsetPageBase
}
QueuePage is a page structure that represents each page information.
type QueueScalingPolicy ¶
type QueueScalingPolicy struct { // The priority of the queue scaling policy. The valid value ranges from 1 to 100. // The larger the value, the higher the priority. Priority int `json:"priority" required:"true"` // The effective time of the queue scaling policy. ImpactStartTime string `json:"impact_start_time" required:"true"` // The expiration time of the queue scaling policy. ImpactStopTime string `json:"impact_stop_time" required:"true"` // The minimum number of CUs allowed by the scaling policy. MinCu int `json:"min_cu" required:"true"` // The maximum number of CUs allowed by the scaling policy. MaxCu int `json:"max_cu" required:"true"` }
QueueScalingPolicy is the structure that represents the policy detail of specified queue associated with the specified elastic resource pool.
type QueuesResp ¶
type QueuesResp struct { // Whether the request is successfully sent. Value true indicates that the request is successfully sent. IsSuccess bool `json:"is_success"` // System prompt. If execution succeeds, the parameter setting may be left blank. Message string `json:"message"` // The list of the queues associated with the specified elastic resource pool. Queues []Queue `json:"queues"` // The number of queues bound to the elastic resource pool. Count int `json:"count"` }
QueuesResp is the structure that represents response of the ListElasticResourcePoolQueues method.
type UpdateQueuePolicyOpts ¶
type UpdateQueuePolicyOpts struct { // The name of the elastic resource pool. ElasticResourcePoolName string `json:"-" required:"true"` // The name of queue. QueueName string `json:"-" required:"true"` // The list of the queue scaling policies. QueueScalingPolicies []QueueScalingPolicy `json:"queue_scaling_policies" required:"true"` }
UpdateQueuePolicyOpts is the structure that used to modify the scaling policy of the queue associated with an elastic resource pool.