github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dli/v3/queues/result.go (about) 1 package queues 2 3 import "github.com/chnsz/golangsdk/pagination" 4 5 // PropertyResp is the structure that represents property detail of the queue. 6 type PropertyResp struct { 7 // The valid values are as follows: 8 // + computeEngine.maxInstances: Maximum number of Spark drivers can be started on this queue. 9 // + computeEngine.maxPrefetchInstan: Maximum number of Spark drivers can be pre-started on this queue. 10 // + job.maxConcurrent: Maximum number of tasks can be concurrently executed by a Spark driver. 11 // + multipleSc.support: Whether multiple spark drivers can be configured. 12 Key string `json:"key"` 13 Value string `json:"value"` 14 } 15 16 // QueuePropertyPage is a single page maximum result representing a query by offset page. 17 type QueuePropertyPage struct { 18 pagination.OffsetPageBase 19 } 20 21 // ExtractProperties is a method to extract the list of properties. 22 func ExtractProperties(r pagination.Page) ([]PropertyResp, error) { 23 var s []PropertyResp 24 err := r.(QueuePropertyPage).Result.ExtractIntoSlicePtr(&s, "properties") 25 return s, err 26 } 27 28 // QueuePropertyResp is the structure that represents response of UpdateQueueProperty or DeleteQueueProperties method. 29 type QueuePropertyResp struct { 30 // Whether the request is successfully executed. Value true indicates that the request is successfully executed. 31 IsSuccess bool `json:"is_success"` 32 // System prompt. If execution succeeds, the parameter setting may be left blank. 33 Message string `json:"message"` 34 }