go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/server/tq/internal/tqpb/tasks.pb.go (about) 1 // Copyright 2020 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by protoc-gen-go. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.31.0 18 // protoc v3.21.7 19 // source: go.chromium.org/luci/server/tq/internal/tqpb/tasks.proto 20 21 package tqpb 22 23 import ( 24 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 25 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 26 reflect "reflect" 27 sync "sync" 28 ) 29 30 const ( 31 // Verify that this generated code is sufficiently up-to-date. 32 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 33 // Verify that runtime/protoimpl is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 35 ) 36 37 // SweepTask is used to distribute sweeping work items and options when doing 38 // distributed sweeps. 39 // 40 // All fields are required. 41 type SweepTask struct { 42 state protoimpl.MessageState 43 sizeCache protoimpl.SizeCache 44 unknownFields protoimpl.UnknownFields 45 46 // DB is an identifier of the database used for reminders. 47 // 48 // It must be registered in the process that does the sweeping. 49 Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"` 50 // Partition specifies the range of keys to scan as [Low..High). 51 // 52 // It is a string of the form "<hex-low>_<hex-high>". 53 Partition string `protobuf:"bytes,2,opt,name=partition,proto3" json:"partition,omitempty"` 54 // Identifies a registered Lessor implementation to grab leases through. 55 LessorId string `protobuf:"bytes,3,opt,name=lessor_id,json=lessorId,proto3" json:"lessor_id,omitempty"` 56 // Identifier of a lease section ID to grab leases on sub-partitions through. 57 LeaseSectionId string `protobuf:"bytes,4,opt,name=lease_section_id,json=leaseSectionId,proto3" json:"lease_section_id,omitempty"` 58 // Total number of shards used when this task was generated. 59 // 60 // Used FYI only in logs. 61 ShardCount int32 `protobuf:"varint,5,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty"` 62 // Shard number in the range of [0 .. Shards). 63 // 64 // Used FYI only in logs. 65 ShardIndex int32 `protobuf:"varint,6,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty"` 66 // Level counts recursion level for monitoring/debugging purposes. 67 // 68 // The root sweeper triggers tasks at level=0. If there is a big backlog, 69 // level=0 task will offload some work to level=1 tasks. level > 1 should not 70 // normally happen and indicates either a bug or a very overloaded system. 71 // 72 // level > 2 won't be executed at all. 73 Level int32 `protobuf:"varint,7,opt,name=level,proto3" json:"level,omitempty"` 74 // Length of the reminder keys in the partition. 75 // 76 // Used to figure out the upper bound of the scan. Usually 16. 77 KeySpaceBytes int32 `protobuf:"varint,8,opt,name=key_space_bytes,json=keySpaceBytes,proto3" json:"key_space_bytes,omitempty"` 78 // Caps maximum number of reminders to process. 79 // 80 // Usually in hundreds. 81 TasksPerScan int32 `protobuf:"varint,9,opt,name=tasks_per_scan,json=tasksPerScan,proto3" json:"tasks_per_scan,omitempty"` 82 // Caps the number of follow-up scans. 83 // 84 // Usually 16. 85 SecondaryScanShards int32 `protobuf:"varint,10,opt,name=secondary_scan_shards,json=secondaryScanShards,proto3" json:"secondary_scan_shards,omitempty"` 86 } 87 88 func (x *SweepTask) Reset() { 89 *x = SweepTask{} 90 if protoimpl.UnsafeEnabled { 91 mi := &file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_msgTypes[0] 92 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 93 ms.StoreMessageInfo(mi) 94 } 95 } 96 97 func (x *SweepTask) String() string { 98 return protoimpl.X.MessageStringOf(x) 99 } 100 101 func (*SweepTask) ProtoMessage() {} 102 103 func (x *SweepTask) ProtoReflect() protoreflect.Message { 104 mi := &file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_msgTypes[0] 105 if protoimpl.UnsafeEnabled && x != nil { 106 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 107 if ms.LoadMessageInfo() == nil { 108 ms.StoreMessageInfo(mi) 109 } 110 return ms 111 } 112 return mi.MessageOf(x) 113 } 114 115 // Deprecated: Use SweepTask.ProtoReflect.Descriptor instead. 116 func (*SweepTask) Descriptor() ([]byte, []int) { 117 return file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescGZIP(), []int{0} 118 } 119 120 func (x *SweepTask) GetDb() string { 121 if x != nil { 122 return x.Db 123 } 124 return "" 125 } 126 127 func (x *SweepTask) GetPartition() string { 128 if x != nil { 129 return x.Partition 130 } 131 return "" 132 } 133 134 func (x *SweepTask) GetLessorId() string { 135 if x != nil { 136 return x.LessorId 137 } 138 return "" 139 } 140 141 func (x *SweepTask) GetLeaseSectionId() string { 142 if x != nil { 143 return x.LeaseSectionId 144 } 145 return "" 146 } 147 148 func (x *SweepTask) GetShardCount() int32 { 149 if x != nil { 150 return x.ShardCount 151 } 152 return 0 153 } 154 155 func (x *SweepTask) GetShardIndex() int32 { 156 if x != nil { 157 return x.ShardIndex 158 } 159 return 0 160 } 161 162 func (x *SweepTask) GetLevel() int32 { 163 if x != nil { 164 return x.Level 165 } 166 return 0 167 } 168 169 func (x *SweepTask) GetKeySpaceBytes() int32 { 170 if x != nil { 171 return x.KeySpaceBytes 172 } 173 return 0 174 } 175 176 func (x *SweepTask) GetTasksPerScan() int32 { 177 if x != nil { 178 return x.TasksPerScan 179 } 180 return 0 181 } 182 183 func (x *SweepTask) GetSecondaryScanShards() int32 { 184 if x != nil { 185 return x.SecondaryScanShards 186 } 187 return 0 188 } 189 190 var File_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto protoreflect.FileDescriptor 191 192 var file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDesc = []byte{ 193 0x0a, 0x38, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 194 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x74, 0x71, 195 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x71, 0x70, 0x62, 0x2f, 0x74, 196 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6c, 0x75, 0x63, 0x69, 197 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x71, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 198 0x6e, 0x61, 0x6c, 0x22, 0xda, 0x02, 0x0a, 0x09, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x61, 0x73, 199 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 200 0x62, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 201 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 202 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 203 0x28, 0x09, 0x52, 0x08, 0x6c, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 204 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 205 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x63, 206 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 207 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x68, 0x61, 208 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x64, 209 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x68, 210 0x61, 0x72, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 211 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x26, 212 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 213 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x53, 0x70, 0x61, 0x63, 214 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 215 0x70, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 216 0x74, 0x61, 0x73, 0x6b, 0x73, 0x50, 0x65, 0x72, 0x53, 0x63, 0x61, 0x6e, 0x12, 0x32, 0x0a, 0x15, 217 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x5f, 0x73, 218 0x68, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x73, 0x65, 0x63, 219 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x53, 0x68, 0x61, 0x72, 0x64, 0x73, 220 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 221 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 222 0x74, 0x71, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x71, 0x70, 0x62, 223 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 224 } 225 226 var ( 227 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescOnce sync.Once 228 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescData = file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDesc 229 ) 230 231 func file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescGZIP() []byte { 232 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescOnce.Do(func() { 233 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescData) 234 }) 235 return file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDescData 236 } 237 238 var file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 239 var file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_goTypes = []interface{}{ 240 (*SweepTask)(nil), // 0: luci.server.tq.internal.SweepTask 241 } 242 var file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_depIdxs = []int32{ 243 0, // [0:0] is the sub-list for method output_type 244 0, // [0:0] is the sub-list for method input_type 245 0, // [0:0] is the sub-list for extension type_name 246 0, // [0:0] is the sub-list for extension extendee 247 0, // [0:0] is the sub-list for field type_name 248 } 249 250 func init() { file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_init() } 251 func file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_init() { 252 if File_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto != nil { 253 return 254 } 255 if !protoimpl.UnsafeEnabled { 256 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 257 switch v := v.(*SweepTask); i { 258 case 0: 259 return &v.state 260 case 1: 261 return &v.sizeCache 262 case 2: 263 return &v.unknownFields 264 default: 265 return nil 266 } 267 } 268 } 269 type x struct{} 270 out := protoimpl.TypeBuilder{ 271 File: protoimpl.DescBuilder{ 272 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 273 RawDescriptor: file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDesc, 274 NumEnums: 0, 275 NumMessages: 1, 276 NumExtensions: 0, 277 NumServices: 0, 278 }, 279 GoTypes: file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_goTypes, 280 DependencyIndexes: file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_depIdxs, 281 MessageInfos: file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_msgTypes, 282 }.Build() 283 File_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto = out.File 284 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_rawDesc = nil 285 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_goTypes = nil 286 file_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto_depIdxs = nil 287 }