github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dis/v2/streams/results.go (about) 1 package streams 2 3 import ( 4 "github.com/chnsz/golangsdk/openstack/common/tags" 5 ) 6 7 type StreamDetail struct { 8 AutoScaleEnabled bool `json:"auto_scale_enabled"` 9 AutoScaleMaxPartitionCount int `json:"auto_scale_max_partition_count"` 10 AutoScaleMinPartitionCount int `json:"auto_scale_min_partition_count"` 11 CompressionFormat string `json:"compression_format"` 12 CreateTime int `json:"create_time"` 13 CsvProperties CsvProperty `json:"csv_properties"` 14 DataSchema string `json:"data_schema"` 15 DataType string `json:"data_type"` 16 LastModifiedTime int `json:"last_modified_time"` 17 RetentionPeriod int `json:"retention_period"` 18 Status string `json:"status"` //status: CREATING,RUNNING,TERMINATING,TERMINATED 19 StreamId string `json:"stream_id"` 20 StreamName string `json:"stream_name"` 21 StreamType string `json:"stream_type"` //COMMON:1MB bandwidth- ADVANCED:5MB bandwidth 22 Tags []tags.ResourceTag `json:"tags"` 23 SysTags []tags.ResourceTag `json:"sys_tags"` 24 // scaling operation record list. 25 UpdatePartitionCounts []UpdatePartitionLog `json:"update_partition_counts"` 26 // Total number of writable partitions (including partitions in ACTIVE state only). 27 WritablePartitionCount int `json:"writable_partition_count"` 28 // Total number of readable partitions (including partitions in ACTIVE and DELETED state). 29 ReadablePartitionCount int `json:"readable_partition_count"` 30 // A list of partitions that comprise the DIS stream. 31 Partitions []Partition `json:"partitions"` 32 // Specify whether there are more matching partitions of the DIS stream to list. 33 HasMorePartitions bool `json:"has_more_partitions"` 34 } 35 36 type Partition struct { 37 // Current status of each partition. CREATING,ACTIVE, DELETED, EXPIRED 38 Status string `json:"status"` 39 // Unique identifier of the partition. 40 PartitionId string `json:"partition_id"` 41 // Possible value range of the hash key used by each partition. 42 HashRange string `json:"hash_range"` 43 // Sequence number range of each partition. 44 SequenceNumberRange string `json:"sequence_number_range"` 45 } 46 47 type UpdatePartitionLog struct { 48 CreateTimestamp int `json:"create_timestamp"` 49 SrcPartitionCount int `json:"src_partition_count"` 50 TargetPartitionCount int `json:"target_partition_count"` 51 ResultCode int `json:"result_code"` 52 ResultMsg int `json:"result_msg"` 53 AutoScale bool `json:"auto_scale"` 54 } 55 56 type ListResult struct { 57 HasMoreStreams bool `json:"has_more_streams"` 58 StreamList []Stream `json:"stream_info_list"` 59 StreamNames []string `json:"stream_names"` 60 TotalNumber int `json:"total_number"` 61 } 62 63 type Stream struct { 64 StreamName string `json:"stream_name"` 65 CreateTime int `json:"create_time"` 66 RetentionPeriod int `json:"retention_period"` 67 Status string `json:"status"` 68 StreamType string `json:"stream_type"` 69 DataType string `json:"data_type"` 70 PartitionCount int `json:"partition_count"` 71 AutoScaleEnabled bool `json:"auto_scale_enabled"` 72 AutoScaleMinPartitionCount int `json:"auto_scale_min_partition_count"` 73 AutoScaleMaxPartitionCount int `json:"auto_scale_max_partition_count"` 74 Tags []tags.ResourceTag `json:"tags"` 75 SysTags []tags.ResourceTag `json:"sys_tags"` 76 } 77 78 type ListPolicyResult struct { 79 StreamId string `json:"stream_id"` 80 Rules []Policy `json:"rules"` 81 } 82 83 type Policy struct { 84 Principal string `json:"principal"` 85 PrincipalName string `json:"principal_name"` 86 ActionType string `json:"action_type"` 87 Effect string `json:"effect"` 88 }