worker.pb.go 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.6
  4. // protoc v5.29.3
  5. // source: worker.proto
  6. package worker_pb
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. unsafe "unsafe"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. // WorkerMessage represents messages from worker to admin
  21. type WorkerMessage struct {
  22. state protoimpl.MessageState `protogen:"open.v1"`
  23. WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  24. Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
  25. // Types that are valid to be assigned to Message:
  26. //
  27. // *WorkerMessage_Registration
  28. // *WorkerMessage_Heartbeat
  29. // *WorkerMessage_TaskRequest
  30. // *WorkerMessage_TaskUpdate
  31. // *WorkerMessage_TaskComplete
  32. // *WorkerMessage_Shutdown
  33. // *WorkerMessage_TaskLogResponse
  34. Message isWorkerMessage_Message `protobuf_oneof:"message"`
  35. unknownFields protoimpl.UnknownFields
  36. sizeCache protoimpl.SizeCache
  37. }
  38. func (x *WorkerMessage) Reset() {
  39. *x = WorkerMessage{}
  40. mi := &file_worker_proto_msgTypes[0]
  41. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  42. ms.StoreMessageInfo(mi)
  43. }
  44. func (x *WorkerMessage) String() string {
  45. return protoimpl.X.MessageStringOf(x)
  46. }
  47. func (*WorkerMessage) ProtoMessage() {}
  48. func (x *WorkerMessage) ProtoReflect() protoreflect.Message {
  49. mi := &file_worker_proto_msgTypes[0]
  50. if x != nil {
  51. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  52. if ms.LoadMessageInfo() == nil {
  53. ms.StoreMessageInfo(mi)
  54. }
  55. return ms
  56. }
  57. return mi.MessageOf(x)
  58. }
  59. // Deprecated: Use WorkerMessage.ProtoReflect.Descriptor instead.
  60. func (*WorkerMessage) Descriptor() ([]byte, []int) {
  61. return file_worker_proto_rawDescGZIP(), []int{0}
  62. }
  63. func (x *WorkerMessage) GetWorkerId() string {
  64. if x != nil {
  65. return x.WorkerId
  66. }
  67. return ""
  68. }
  69. func (x *WorkerMessage) GetTimestamp() int64 {
  70. if x != nil {
  71. return x.Timestamp
  72. }
  73. return 0
  74. }
  75. func (x *WorkerMessage) GetMessage() isWorkerMessage_Message {
  76. if x != nil {
  77. return x.Message
  78. }
  79. return nil
  80. }
  81. func (x *WorkerMessage) GetRegistration() *WorkerRegistration {
  82. if x != nil {
  83. if x, ok := x.Message.(*WorkerMessage_Registration); ok {
  84. return x.Registration
  85. }
  86. }
  87. return nil
  88. }
  89. func (x *WorkerMessage) GetHeartbeat() *WorkerHeartbeat {
  90. if x != nil {
  91. if x, ok := x.Message.(*WorkerMessage_Heartbeat); ok {
  92. return x.Heartbeat
  93. }
  94. }
  95. return nil
  96. }
  97. func (x *WorkerMessage) GetTaskRequest() *TaskRequest {
  98. if x != nil {
  99. if x, ok := x.Message.(*WorkerMessage_TaskRequest); ok {
  100. return x.TaskRequest
  101. }
  102. }
  103. return nil
  104. }
  105. func (x *WorkerMessage) GetTaskUpdate() *TaskUpdate {
  106. if x != nil {
  107. if x, ok := x.Message.(*WorkerMessage_TaskUpdate); ok {
  108. return x.TaskUpdate
  109. }
  110. }
  111. return nil
  112. }
  113. func (x *WorkerMessage) GetTaskComplete() *TaskComplete {
  114. if x != nil {
  115. if x, ok := x.Message.(*WorkerMessage_TaskComplete); ok {
  116. return x.TaskComplete
  117. }
  118. }
  119. return nil
  120. }
  121. func (x *WorkerMessage) GetShutdown() *WorkerShutdown {
  122. if x != nil {
  123. if x, ok := x.Message.(*WorkerMessage_Shutdown); ok {
  124. return x.Shutdown
  125. }
  126. }
  127. return nil
  128. }
  129. func (x *WorkerMessage) GetTaskLogResponse() *TaskLogResponse {
  130. if x != nil {
  131. if x, ok := x.Message.(*WorkerMessage_TaskLogResponse); ok {
  132. return x.TaskLogResponse
  133. }
  134. }
  135. return nil
  136. }
  137. type isWorkerMessage_Message interface {
  138. isWorkerMessage_Message()
  139. }
  140. type WorkerMessage_Registration struct {
  141. Registration *WorkerRegistration `protobuf:"bytes,3,opt,name=registration,proto3,oneof"`
  142. }
  143. type WorkerMessage_Heartbeat struct {
  144. Heartbeat *WorkerHeartbeat `protobuf:"bytes,4,opt,name=heartbeat,proto3,oneof"`
  145. }
  146. type WorkerMessage_TaskRequest struct {
  147. TaskRequest *TaskRequest `protobuf:"bytes,5,opt,name=task_request,json=taskRequest,proto3,oneof"`
  148. }
  149. type WorkerMessage_TaskUpdate struct {
  150. TaskUpdate *TaskUpdate `protobuf:"bytes,6,opt,name=task_update,json=taskUpdate,proto3,oneof"`
  151. }
  152. type WorkerMessage_TaskComplete struct {
  153. TaskComplete *TaskComplete `protobuf:"bytes,7,opt,name=task_complete,json=taskComplete,proto3,oneof"`
  154. }
  155. type WorkerMessage_Shutdown struct {
  156. Shutdown *WorkerShutdown `protobuf:"bytes,8,opt,name=shutdown,proto3,oneof"`
  157. }
  158. type WorkerMessage_TaskLogResponse struct {
  159. TaskLogResponse *TaskLogResponse `protobuf:"bytes,9,opt,name=task_log_response,json=taskLogResponse,proto3,oneof"`
  160. }
  161. func (*WorkerMessage_Registration) isWorkerMessage_Message() {}
  162. func (*WorkerMessage_Heartbeat) isWorkerMessage_Message() {}
  163. func (*WorkerMessage_TaskRequest) isWorkerMessage_Message() {}
  164. func (*WorkerMessage_TaskUpdate) isWorkerMessage_Message() {}
  165. func (*WorkerMessage_TaskComplete) isWorkerMessage_Message() {}
  166. func (*WorkerMessage_Shutdown) isWorkerMessage_Message() {}
  167. func (*WorkerMessage_TaskLogResponse) isWorkerMessage_Message() {}
  168. // AdminMessage represents messages from admin to worker
  169. type AdminMessage struct {
  170. state protoimpl.MessageState `protogen:"open.v1"`
  171. AdminId string `protobuf:"bytes,1,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"`
  172. Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
  173. // Types that are valid to be assigned to Message:
  174. //
  175. // *AdminMessage_RegistrationResponse
  176. // *AdminMessage_HeartbeatResponse
  177. // *AdminMessage_TaskAssignment
  178. // *AdminMessage_TaskCancellation
  179. // *AdminMessage_AdminShutdown
  180. // *AdminMessage_TaskLogRequest
  181. Message isAdminMessage_Message `protobuf_oneof:"message"`
  182. unknownFields protoimpl.UnknownFields
  183. sizeCache protoimpl.SizeCache
  184. }
  185. func (x *AdminMessage) Reset() {
  186. *x = AdminMessage{}
  187. mi := &file_worker_proto_msgTypes[1]
  188. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  189. ms.StoreMessageInfo(mi)
  190. }
  191. func (x *AdminMessage) String() string {
  192. return protoimpl.X.MessageStringOf(x)
  193. }
  194. func (*AdminMessage) ProtoMessage() {}
  195. func (x *AdminMessage) ProtoReflect() protoreflect.Message {
  196. mi := &file_worker_proto_msgTypes[1]
  197. if x != nil {
  198. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  199. if ms.LoadMessageInfo() == nil {
  200. ms.StoreMessageInfo(mi)
  201. }
  202. return ms
  203. }
  204. return mi.MessageOf(x)
  205. }
  206. // Deprecated: Use AdminMessage.ProtoReflect.Descriptor instead.
  207. func (*AdminMessage) Descriptor() ([]byte, []int) {
  208. return file_worker_proto_rawDescGZIP(), []int{1}
  209. }
  210. func (x *AdminMessage) GetAdminId() string {
  211. if x != nil {
  212. return x.AdminId
  213. }
  214. return ""
  215. }
  216. func (x *AdminMessage) GetTimestamp() int64 {
  217. if x != nil {
  218. return x.Timestamp
  219. }
  220. return 0
  221. }
  222. func (x *AdminMessage) GetMessage() isAdminMessage_Message {
  223. if x != nil {
  224. return x.Message
  225. }
  226. return nil
  227. }
  228. func (x *AdminMessage) GetRegistrationResponse() *RegistrationResponse {
  229. if x != nil {
  230. if x, ok := x.Message.(*AdminMessage_RegistrationResponse); ok {
  231. return x.RegistrationResponse
  232. }
  233. }
  234. return nil
  235. }
  236. func (x *AdminMessage) GetHeartbeatResponse() *HeartbeatResponse {
  237. if x != nil {
  238. if x, ok := x.Message.(*AdminMessage_HeartbeatResponse); ok {
  239. return x.HeartbeatResponse
  240. }
  241. }
  242. return nil
  243. }
  244. func (x *AdminMessage) GetTaskAssignment() *TaskAssignment {
  245. if x != nil {
  246. if x, ok := x.Message.(*AdminMessage_TaskAssignment); ok {
  247. return x.TaskAssignment
  248. }
  249. }
  250. return nil
  251. }
  252. func (x *AdminMessage) GetTaskCancellation() *TaskCancellation {
  253. if x != nil {
  254. if x, ok := x.Message.(*AdminMessage_TaskCancellation); ok {
  255. return x.TaskCancellation
  256. }
  257. }
  258. return nil
  259. }
  260. func (x *AdminMessage) GetAdminShutdown() *AdminShutdown {
  261. if x != nil {
  262. if x, ok := x.Message.(*AdminMessage_AdminShutdown); ok {
  263. return x.AdminShutdown
  264. }
  265. }
  266. return nil
  267. }
  268. func (x *AdminMessage) GetTaskLogRequest() *TaskLogRequest {
  269. if x != nil {
  270. if x, ok := x.Message.(*AdminMessage_TaskLogRequest); ok {
  271. return x.TaskLogRequest
  272. }
  273. }
  274. return nil
  275. }
  276. type isAdminMessage_Message interface {
  277. isAdminMessage_Message()
  278. }
  279. type AdminMessage_RegistrationResponse struct {
  280. RegistrationResponse *RegistrationResponse `protobuf:"bytes,3,opt,name=registration_response,json=registrationResponse,proto3,oneof"`
  281. }
  282. type AdminMessage_HeartbeatResponse struct {
  283. HeartbeatResponse *HeartbeatResponse `protobuf:"bytes,4,opt,name=heartbeat_response,json=heartbeatResponse,proto3,oneof"`
  284. }
  285. type AdminMessage_TaskAssignment struct {
  286. TaskAssignment *TaskAssignment `protobuf:"bytes,5,opt,name=task_assignment,json=taskAssignment,proto3,oneof"`
  287. }
  288. type AdminMessage_TaskCancellation struct {
  289. TaskCancellation *TaskCancellation `protobuf:"bytes,6,opt,name=task_cancellation,json=taskCancellation,proto3,oneof"`
  290. }
  291. type AdminMessage_AdminShutdown struct {
  292. AdminShutdown *AdminShutdown `protobuf:"bytes,7,opt,name=admin_shutdown,json=adminShutdown,proto3,oneof"`
  293. }
  294. type AdminMessage_TaskLogRequest struct {
  295. TaskLogRequest *TaskLogRequest `protobuf:"bytes,8,opt,name=task_log_request,json=taskLogRequest,proto3,oneof"`
  296. }
  297. func (*AdminMessage_RegistrationResponse) isAdminMessage_Message() {}
  298. func (*AdminMessage_HeartbeatResponse) isAdminMessage_Message() {}
  299. func (*AdminMessage_TaskAssignment) isAdminMessage_Message() {}
  300. func (*AdminMessage_TaskCancellation) isAdminMessage_Message() {}
  301. func (*AdminMessage_AdminShutdown) isAdminMessage_Message() {}
  302. func (*AdminMessage_TaskLogRequest) isAdminMessage_Message() {}
  303. // WorkerRegistration message when worker connects
  304. type WorkerRegistration struct {
  305. state protoimpl.MessageState `protogen:"open.v1"`
  306. WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  307. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
  308. Capabilities []string `protobuf:"bytes,3,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
  309. MaxConcurrent int32 `protobuf:"varint,4,opt,name=max_concurrent,json=maxConcurrent,proto3" json:"max_concurrent,omitempty"`
  310. Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  311. unknownFields protoimpl.UnknownFields
  312. sizeCache protoimpl.SizeCache
  313. }
  314. func (x *WorkerRegistration) Reset() {
  315. *x = WorkerRegistration{}
  316. mi := &file_worker_proto_msgTypes[2]
  317. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  318. ms.StoreMessageInfo(mi)
  319. }
  320. func (x *WorkerRegistration) String() string {
  321. return protoimpl.X.MessageStringOf(x)
  322. }
  323. func (*WorkerRegistration) ProtoMessage() {}
  324. func (x *WorkerRegistration) ProtoReflect() protoreflect.Message {
  325. mi := &file_worker_proto_msgTypes[2]
  326. if x != nil {
  327. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  328. if ms.LoadMessageInfo() == nil {
  329. ms.StoreMessageInfo(mi)
  330. }
  331. return ms
  332. }
  333. return mi.MessageOf(x)
  334. }
  335. // Deprecated: Use WorkerRegistration.ProtoReflect.Descriptor instead.
  336. func (*WorkerRegistration) Descriptor() ([]byte, []int) {
  337. return file_worker_proto_rawDescGZIP(), []int{2}
  338. }
  339. func (x *WorkerRegistration) GetWorkerId() string {
  340. if x != nil {
  341. return x.WorkerId
  342. }
  343. return ""
  344. }
  345. func (x *WorkerRegistration) GetAddress() string {
  346. if x != nil {
  347. return x.Address
  348. }
  349. return ""
  350. }
  351. func (x *WorkerRegistration) GetCapabilities() []string {
  352. if x != nil {
  353. return x.Capabilities
  354. }
  355. return nil
  356. }
  357. func (x *WorkerRegistration) GetMaxConcurrent() int32 {
  358. if x != nil {
  359. return x.MaxConcurrent
  360. }
  361. return 0
  362. }
  363. func (x *WorkerRegistration) GetMetadata() map[string]string {
  364. if x != nil {
  365. return x.Metadata
  366. }
  367. return nil
  368. }
  369. // RegistrationResponse confirms worker registration
  370. type RegistrationResponse struct {
  371. state protoimpl.MessageState `protogen:"open.v1"`
  372. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
  373. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
  374. AssignedWorkerId string `protobuf:"bytes,3,opt,name=assigned_worker_id,json=assignedWorkerId,proto3" json:"assigned_worker_id,omitempty"`
  375. unknownFields protoimpl.UnknownFields
  376. sizeCache protoimpl.SizeCache
  377. }
  378. func (x *RegistrationResponse) Reset() {
  379. *x = RegistrationResponse{}
  380. mi := &file_worker_proto_msgTypes[3]
  381. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  382. ms.StoreMessageInfo(mi)
  383. }
  384. func (x *RegistrationResponse) String() string {
  385. return protoimpl.X.MessageStringOf(x)
  386. }
  387. func (*RegistrationResponse) ProtoMessage() {}
  388. func (x *RegistrationResponse) ProtoReflect() protoreflect.Message {
  389. mi := &file_worker_proto_msgTypes[3]
  390. if x != nil {
  391. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  392. if ms.LoadMessageInfo() == nil {
  393. ms.StoreMessageInfo(mi)
  394. }
  395. return ms
  396. }
  397. return mi.MessageOf(x)
  398. }
  399. // Deprecated: Use RegistrationResponse.ProtoReflect.Descriptor instead.
  400. func (*RegistrationResponse) Descriptor() ([]byte, []int) {
  401. return file_worker_proto_rawDescGZIP(), []int{3}
  402. }
  403. func (x *RegistrationResponse) GetSuccess() bool {
  404. if x != nil {
  405. return x.Success
  406. }
  407. return false
  408. }
  409. func (x *RegistrationResponse) GetMessage() string {
  410. if x != nil {
  411. return x.Message
  412. }
  413. return ""
  414. }
  415. func (x *RegistrationResponse) GetAssignedWorkerId() string {
  416. if x != nil {
  417. return x.AssignedWorkerId
  418. }
  419. return ""
  420. }
  421. // WorkerHeartbeat sent periodically by worker
  422. type WorkerHeartbeat struct {
  423. state protoimpl.MessageState `protogen:"open.v1"`
  424. WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  425. Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
  426. CurrentLoad int32 `protobuf:"varint,3,opt,name=current_load,json=currentLoad,proto3" json:"current_load,omitempty"`
  427. MaxConcurrent int32 `protobuf:"varint,4,opt,name=max_concurrent,json=maxConcurrent,proto3" json:"max_concurrent,omitempty"`
  428. CurrentTaskIds []string `protobuf:"bytes,5,rep,name=current_task_ids,json=currentTaskIds,proto3" json:"current_task_ids,omitempty"`
  429. TasksCompleted int32 `protobuf:"varint,6,opt,name=tasks_completed,json=tasksCompleted,proto3" json:"tasks_completed,omitempty"`
  430. TasksFailed int32 `protobuf:"varint,7,opt,name=tasks_failed,json=tasksFailed,proto3" json:"tasks_failed,omitempty"`
  431. UptimeSeconds int64 `protobuf:"varint,8,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"`
  432. unknownFields protoimpl.UnknownFields
  433. sizeCache protoimpl.SizeCache
  434. }
  435. func (x *WorkerHeartbeat) Reset() {
  436. *x = WorkerHeartbeat{}
  437. mi := &file_worker_proto_msgTypes[4]
  438. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  439. ms.StoreMessageInfo(mi)
  440. }
  441. func (x *WorkerHeartbeat) String() string {
  442. return protoimpl.X.MessageStringOf(x)
  443. }
  444. func (*WorkerHeartbeat) ProtoMessage() {}
  445. func (x *WorkerHeartbeat) ProtoReflect() protoreflect.Message {
  446. mi := &file_worker_proto_msgTypes[4]
  447. if x != nil {
  448. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  449. if ms.LoadMessageInfo() == nil {
  450. ms.StoreMessageInfo(mi)
  451. }
  452. return ms
  453. }
  454. return mi.MessageOf(x)
  455. }
  456. // Deprecated: Use WorkerHeartbeat.ProtoReflect.Descriptor instead.
  457. func (*WorkerHeartbeat) Descriptor() ([]byte, []int) {
  458. return file_worker_proto_rawDescGZIP(), []int{4}
  459. }
  460. func (x *WorkerHeartbeat) GetWorkerId() string {
  461. if x != nil {
  462. return x.WorkerId
  463. }
  464. return ""
  465. }
  466. func (x *WorkerHeartbeat) GetStatus() string {
  467. if x != nil {
  468. return x.Status
  469. }
  470. return ""
  471. }
  472. func (x *WorkerHeartbeat) GetCurrentLoad() int32 {
  473. if x != nil {
  474. return x.CurrentLoad
  475. }
  476. return 0
  477. }
  478. func (x *WorkerHeartbeat) GetMaxConcurrent() int32 {
  479. if x != nil {
  480. return x.MaxConcurrent
  481. }
  482. return 0
  483. }
  484. func (x *WorkerHeartbeat) GetCurrentTaskIds() []string {
  485. if x != nil {
  486. return x.CurrentTaskIds
  487. }
  488. return nil
  489. }
  490. func (x *WorkerHeartbeat) GetTasksCompleted() int32 {
  491. if x != nil {
  492. return x.TasksCompleted
  493. }
  494. return 0
  495. }
  496. func (x *WorkerHeartbeat) GetTasksFailed() int32 {
  497. if x != nil {
  498. return x.TasksFailed
  499. }
  500. return 0
  501. }
  502. func (x *WorkerHeartbeat) GetUptimeSeconds() int64 {
  503. if x != nil {
  504. return x.UptimeSeconds
  505. }
  506. return 0
  507. }
  508. // HeartbeatResponse acknowledges heartbeat
  509. type HeartbeatResponse struct {
  510. state protoimpl.MessageState `protogen:"open.v1"`
  511. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
  512. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
  513. unknownFields protoimpl.UnknownFields
  514. sizeCache protoimpl.SizeCache
  515. }
  516. func (x *HeartbeatResponse) Reset() {
  517. *x = HeartbeatResponse{}
  518. mi := &file_worker_proto_msgTypes[5]
  519. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  520. ms.StoreMessageInfo(mi)
  521. }
  522. func (x *HeartbeatResponse) String() string {
  523. return protoimpl.X.MessageStringOf(x)
  524. }
  525. func (*HeartbeatResponse) ProtoMessage() {}
  526. func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message {
  527. mi := &file_worker_proto_msgTypes[5]
  528. if x != nil {
  529. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  530. if ms.LoadMessageInfo() == nil {
  531. ms.StoreMessageInfo(mi)
  532. }
  533. return ms
  534. }
  535. return mi.MessageOf(x)
  536. }
  537. // Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
  538. func (*HeartbeatResponse) Descriptor() ([]byte, []int) {
  539. return file_worker_proto_rawDescGZIP(), []int{5}
  540. }
  541. func (x *HeartbeatResponse) GetSuccess() bool {
  542. if x != nil {
  543. return x.Success
  544. }
  545. return false
  546. }
  547. func (x *HeartbeatResponse) GetMessage() string {
  548. if x != nil {
  549. return x.Message
  550. }
  551. return ""
  552. }
  553. // TaskRequest from worker asking for new tasks
  554. type TaskRequest struct {
  555. state protoimpl.MessageState `protogen:"open.v1"`
  556. WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  557. Capabilities []string `protobuf:"bytes,2,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
  558. AvailableSlots int32 `protobuf:"varint,3,opt,name=available_slots,json=availableSlots,proto3" json:"available_slots,omitempty"`
  559. unknownFields protoimpl.UnknownFields
  560. sizeCache protoimpl.SizeCache
  561. }
  562. func (x *TaskRequest) Reset() {
  563. *x = TaskRequest{}
  564. mi := &file_worker_proto_msgTypes[6]
  565. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  566. ms.StoreMessageInfo(mi)
  567. }
  568. func (x *TaskRequest) String() string {
  569. return protoimpl.X.MessageStringOf(x)
  570. }
  571. func (*TaskRequest) ProtoMessage() {}
  572. func (x *TaskRequest) ProtoReflect() protoreflect.Message {
  573. mi := &file_worker_proto_msgTypes[6]
  574. if x != nil {
  575. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  576. if ms.LoadMessageInfo() == nil {
  577. ms.StoreMessageInfo(mi)
  578. }
  579. return ms
  580. }
  581. return mi.MessageOf(x)
  582. }
  583. // Deprecated: Use TaskRequest.ProtoReflect.Descriptor instead.
  584. func (*TaskRequest) Descriptor() ([]byte, []int) {
  585. return file_worker_proto_rawDescGZIP(), []int{6}
  586. }
  587. func (x *TaskRequest) GetWorkerId() string {
  588. if x != nil {
  589. return x.WorkerId
  590. }
  591. return ""
  592. }
  593. func (x *TaskRequest) GetCapabilities() []string {
  594. if x != nil {
  595. return x.Capabilities
  596. }
  597. return nil
  598. }
  599. func (x *TaskRequest) GetAvailableSlots() int32 {
  600. if x != nil {
  601. return x.AvailableSlots
  602. }
  603. return 0
  604. }
  605. // TaskAssignment from admin to worker
  606. type TaskAssignment struct {
  607. state protoimpl.MessageState `protogen:"open.v1"`
  608. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  609. TaskType string `protobuf:"bytes,2,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
  610. Params *TaskParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"`
  611. Priority int32 `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
  612. CreatedTime int64 `protobuf:"varint,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
  613. Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  614. unknownFields protoimpl.UnknownFields
  615. sizeCache protoimpl.SizeCache
  616. }
  617. func (x *TaskAssignment) Reset() {
  618. *x = TaskAssignment{}
  619. mi := &file_worker_proto_msgTypes[7]
  620. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  621. ms.StoreMessageInfo(mi)
  622. }
  623. func (x *TaskAssignment) String() string {
  624. return protoimpl.X.MessageStringOf(x)
  625. }
  626. func (*TaskAssignment) ProtoMessage() {}
  627. func (x *TaskAssignment) ProtoReflect() protoreflect.Message {
  628. mi := &file_worker_proto_msgTypes[7]
  629. if x != nil {
  630. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  631. if ms.LoadMessageInfo() == nil {
  632. ms.StoreMessageInfo(mi)
  633. }
  634. return ms
  635. }
  636. return mi.MessageOf(x)
  637. }
  638. // Deprecated: Use TaskAssignment.ProtoReflect.Descriptor instead.
  639. func (*TaskAssignment) Descriptor() ([]byte, []int) {
  640. return file_worker_proto_rawDescGZIP(), []int{7}
  641. }
  642. func (x *TaskAssignment) GetTaskId() string {
  643. if x != nil {
  644. return x.TaskId
  645. }
  646. return ""
  647. }
  648. func (x *TaskAssignment) GetTaskType() string {
  649. if x != nil {
  650. return x.TaskType
  651. }
  652. return ""
  653. }
  654. func (x *TaskAssignment) GetParams() *TaskParams {
  655. if x != nil {
  656. return x.Params
  657. }
  658. return nil
  659. }
  660. func (x *TaskAssignment) GetPriority() int32 {
  661. if x != nil {
  662. return x.Priority
  663. }
  664. return 0
  665. }
  666. func (x *TaskAssignment) GetCreatedTime() int64 {
  667. if x != nil {
  668. return x.CreatedTime
  669. }
  670. return 0
  671. }
  672. func (x *TaskAssignment) GetMetadata() map[string]string {
  673. if x != nil {
  674. return x.Metadata
  675. }
  676. return nil
  677. }
  678. // TaskParams contains task-specific parameters with typed variants
  679. type TaskParams struct {
  680. state protoimpl.MessageState `protogen:"open.v1"`
  681. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // ActiveTopology task ID for lifecycle management
  682. VolumeId uint32 `protobuf:"varint,2,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // Primary volume ID for the task
  683. Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"` // Collection name
  684. DataCenter string `protobuf:"bytes,4,opt,name=data_center,json=dataCenter,proto3" json:"data_center,omitempty"` // Primary data center
  685. Rack string `protobuf:"bytes,5,opt,name=rack,proto3" json:"rack,omitempty"` // Primary rack
  686. VolumeSize uint64 `protobuf:"varint,6,opt,name=volume_size,json=volumeSize,proto3" json:"volume_size,omitempty"` // Original volume size in bytes for tracking size changes
  687. // Unified source and target arrays for all task types
  688. Sources []*TaskSource `protobuf:"bytes,7,rep,name=sources,proto3" json:"sources,omitempty"` // Source locations (volume replicas, EC shards, etc.)
  689. Targets []*TaskTarget `protobuf:"bytes,8,rep,name=targets,proto3" json:"targets,omitempty"` // Target locations (destinations, new replicas, etc.)
  690. // Typed task parameters
  691. //
  692. // Types that are valid to be assigned to TaskParams:
  693. //
  694. // *TaskParams_VacuumParams
  695. // *TaskParams_ErasureCodingParams
  696. // *TaskParams_BalanceParams
  697. // *TaskParams_ReplicationParams
  698. TaskParams isTaskParams_TaskParams `protobuf_oneof:"task_params"`
  699. unknownFields protoimpl.UnknownFields
  700. sizeCache protoimpl.SizeCache
  701. }
  702. func (x *TaskParams) Reset() {
  703. *x = TaskParams{}
  704. mi := &file_worker_proto_msgTypes[8]
  705. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  706. ms.StoreMessageInfo(mi)
  707. }
  708. func (x *TaskParams) String() string {
  709. return protoimpl.X.MessageStringOf(x)
  710. }
  711. func (*TaskParams) ProtoMessage() {}
  712. func (x *TaskParams) ProtoReflect() protoreflect.Message {
  713. mi := &file_worker_proto_msgTypes[8]
  714. if x != nil {
  715. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  716. if ms.LoadMessageInfo() == nil {
  717. ms.StoreMessageInfo(mi)
  718. }
  719. return ms
  720. }
  721. return mi.MessageOf(x)
  722. }
  723. // Deprecated: Use TaskParams.ProtoReflect.Descriptor instead.
  724. func (*TaskParams) Descriptor() ([]byte, []int) {
  725. return file_worker_proto_rawDescGZIP(), []int{8}
  726. }
  727. func (x *TaskParams) GetTaskId() string {
  728. if x != nil {
  729. return x.TaskId
  730. }
  731. return ""
  732. }
  733. func (x *TaskParams) GetVolumeId() uint32 {
  734. if x != nil {
  735. return x.VolumeId
  736. }
  737. return 0
  738. }
  739. func (x *TaskParams) GetCollection() string {
  740. if x != nil {
  741. return x.Collection
  742. }
  743. return ""
  744. }
  745. func (x *TaskParams) GetDataCenter() string {
  746. if x != nil {
  747. return x.DataCenter
  748. }
  749. return ""
  750. }
  751. func (x *TaskParams) GetRack() string {
  752. if x != nil {
  753. return x.Rack
  754. }
  755. return ""
  756. }
  757. func (x *TaskParams) GetVolumeSize() uint64 {
  758. if x != nil {
  759. return x.VolumeSize
  760. }
  761. return 0
  762. }
  763. func (x *TaskParams) GetSources() []*TaskSource {
  764. if x != nil {
  765. return x.Sources
  766. }
  767. return nil
  768. }
  769. func (x *TaskParams) GetTargets() []*TaskTarget {
  770. if x != nil {
  771. return x.Targets
  772. }
  773. return nil
  774. }
  775. func (x *TaskParams) GetTaskParams() isTaskParams_TaskParams {
  776. if x != nil {
  777. return x.TaskParams
  778. }
  779. return nil
  780. }
  781. func (x *TaskParams) GetVacuumParams() *VacuumTaskParams {
  782. if x != nil {
  783. if x, ok := x.TaskParams.(*TaskParams_VacuumParams); ok {
  784. return x.VacuumParams
  785. }
  786. }
  787. return nil
  788. }
  789. func (x *TaskParams) GetErasureCodingParams() *ErasureCodingTaskParams {
  790. if x != nil {
  791. if x, ok := x.TaskParams.(*TaskParams_ErasureCodingParams); ok {
  792. return x.ErasureCodingParams
  793. }
  794. }
  795. return nil
  796. }
  797. func (x *TaskParams) GetBalanceParams() *BalanceTaskParams {
  798. if x != nil {
  799. if x, ok := x.TaskParams.(*TaskParams_BalanceParams); ok {
  800. return x.BalanceParams
  801. }
  802. }
  803. return nil
  804. }
  805. func (x *TaskParams) GetReplicationParams() *ReplicationTaskParams {
  806. if x != nil {
  807. if x, ok := x.TaskParams.(*TaskParams_ReplicationParams); ok {
  808. return x.ReplicationParams
  809. }
  810. }
  811. return nil
  812. }
  813. type isTaskParams_TaskParams interface {
  814. isTaskParams_TaskParams()
  815. }
  816. type TaskParams_VacuumParams struct {
  817. VacuumParams *VacuumTaskParams `protobuf:"bytes,9,opt,name=vacuum_params,json=vacuumParams,proto3,oneof"`
  818. }
  819. type TaskParams_ErasureCodingParams struct {
  820. ErasureCodingParams *ErasureCodingTaskParams `protobuf:"bytes,10,opt,name=erasure_coding_params,json=erasureCodingParams,proto3,oneof"`
  821. }
  822. type TaskParams_BalanceParams struct {
  823. BalanceParams *BalanceTaskParams `protobuf:"bytes,11,opt,name=balance_params,json=balanceParams,proto3,oneof"`
  824. }
  825. type TaskParams_ReplicationParams struct {
  826. ReplicationParams *ReplicationTaskParams `protobuf:"bytes,12,opt,name=replication_params,json=replicationParams,proto3,oneof"`
  827. }
  828. func (*TaskParams_VacuumParams) isTaskParams_TaskParams() {}
  829. func (*TaskParams_ErasureCodingParams) isTaskParams_TaskParams() {}
  830. func (*TaskParams_BalanceParams) isTaskParams_TaskParams() {}
  831. func (*TaskParams_ReplicationParams) isTaskParams_TaskParams() {}
  832. // VacuumTaskParams for vacuum operations
  833. type VacuumTaskParams struct {
  834. state protoimpl.MessageState `protogen:"open.v1"`
  835. GarbageThreshold float64 `protobuf:"fixed64,1,opt,name=garbage_threshold,json=garbageThreshold,proto3" json:"garbage_threshold,omitempty"` // Minimum garbage ratio to trigger vacuum
  836. ForceVacuum bool `protobuf:"varint,2,opt,name=force_vacuum,json=forceVacuum,proto3" json:"force_vacuum,omitempty"` // Force vacuum even if below threshold
  837. BatchSize int32 `protobuf:"varint,3,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` // Number of files to process per batch
  838. WorkingDir string `protobuf:"bytes,4,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"` // Working directory for temporary files
  839. VerifyChecksum bool `protobuf:"varint,5,opt,name=verify_checksum,json=verifyChecksum,proto3" json:"verify_checksum,omitempty"` // Verify file checksums during vacuum
  840. unknownFields protoimpl.UnknownFields
  841. sizeCache protoimpl.SizeCache
  842. }
  843. func (x *VacuumTaskParams) Reset() {
  844. *x = VacuumTaskParams{}
  845. mi := &file_worker_proto_msgTypes[9]
  846. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  847. ms.StoreMessageInfo(mi)
  848. }
  849. func (x *VacuumTaskParams) String() string {
  850. return protoimpl.X.MessageStringOf(x)
  851. }
  852. func (*VacuumTaskParams) ProtoMessage() {}
  853. func (x *VacuumTaskParams) ProtoReflect() protoreflect.Message {
  854. mi := &file_worker_proto_msgTypes[9]
  855. if x != nil {
  856. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  857. if ms.LoadMessageInfo() == nil {
  858. ms.StoreMessageInfo(mi)
  859. }
  860. return ms
  861. }
  862. return mi.MessageOf(x)
  863. }
  864. // Deprecated: Use VacuumTaskParams.ProtoReflect.Descriptor instead.
  865. func (*VacuumTaskParams) Descriptor() ([]byte, []int) {
  866. return file_worker_proto_rawDescGZIP(), []int{9}
  867. }
  868. func (x *VacuumTaskParams) GetGarbageThreshold() float64 {
  869. if x != nil {
  870. return x.GarbageThreshold
  871. }
  872. return 0
  873. }
  874. func (x *VacuumTaskParams) GetForceVacuum() bool {
  875. if x != nil {
  876. return x.ForceVacuum
  877. }
  878. return false
  879. }
  880. func (x *VacuumTaskParams) GetBatchSize() int32 {
  881. if x != nil {
  882. return x.BatchSize
  883. }
  884. return 0
  885. }
  886. func (x *VacuumTaskParams) GetWorkingDir() string {
  887. if x != nil {
  888. return x.WorkingDir
  889. }
  890. return ""
  891. }
  892. func (x *VacuumTaskParams) GetVerifyChecksum() bool {
  893. if x != nil {
  894. return x.VerifyChecksum
  895. }
  896. return false
  897. }
  898. // ErasureCodingTaskParams for EC encoding operations
  899. type ErasureCodingTaskParams struct {
  900. state protoimpl.MessageState `protogen:"open.v1"`
  901. EstimatedShardSize uint64 `protobuf:"varint,1,opt,name=estimated_shard_size,json=estimatedShardSize,proto3" json:"estimated_shard_size,omitempty"` // Estimated size per shard
  902. DataShards int32 `protobuf:"varint,2,opt,name=data_shards,json=dataShards,proto3" json:"data_shards,omitempty"` // Number of data shards (default: 10)
  903. ParityShards int32 `protobuf:"varint,3,opt,name=parity_shards,json=parityShards,proto3" json:"parity_shards,omitempty"` // Number of parity shards (default: 4)
  904. WorkingDir string `protobuf:"bytes,4,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"` // Working directory for EC processing
  905. MasterClient string `protobuf:"bytes,5,opt,name=master_client,json=masterClient,proto3" json:"master_client,omitempty"` // Master server address
  906. CleanupSource bool `protobuf:"varint,6,opt,name=cleanup_source,json=cleanupSource,proto3" json:"cleanup_source,omitempty"` // Whether to cleanup source volume after EC
  907. unknownFields protoimpl.UnknownFields
  908. sizeCache protoimpl.SizeCache
  909. }
  910. func (x *ErasureCodingTaskParams) Reset() {
  911. *x = ErasureCodingTaskParams{}
  912. mi := &file_worker_proto_msgTypes[10]
  913. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  914. ms.StoreMessageInfo(mi)
  915. }
  916. func (x *ErasureCodingTaskParams) String() string {
  917. return protoimpl.X.MessageStringOf(x)
  918. }
  919. func (*ErasureCodingTaskParams) ProtoMessage() {}
  920. func (x *ErasureCodingTaskParams) ProtoReflect() protoreflect.Message {
  921. mi := &file_worker_proto_msgTypes[10]
  922. if x != nil {
  923. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  924. if ms.LoadMessageInfo() == nil {
  925. ms.StoreMessageInfo(mi)
  926. }
  927. return ms
  928. }
  929. return mi.MessageOf(x)
  930. }
  931. // Deprecated: Use ErasureCodingTaskParams.ProtoReflect.Descriptor instead.
  932. func (*ErasureCodingTaskParams) Descriptor() ([]byte, []int) {
  933. return file_worker_proto_rawDescGZIP(), []int{10}
  934. }
  935. func (x *ErasureCodingTaskParams) GetEstimatedShardSize() uint64 {
  936. if x != nil {
  937. return x.EstimatedShardSize
  938. }
  939. return 0
  940. }
  941. func (x *ErasureCodingTaskParams) GetDataShards() int32 {
  942. if x != nil {
  943. return x.DataShards
  944. }
  945. return 0
  946. }
  947. func (x *ErasureCodingTaskParams) GetParityShards() int32 {
  948. if x != nil {
  949. return x.ParityShards
  950. }
  951. return 0
  952. }
  953. func (x *ErasureCodingTaskParams) GetWorkingDir() string {
  954. if x != nil {
  955. return x.WorkingDir
  956. }
  957. return ""
  958. }
  959. func (x *ErasureCodingTaskParams) GetMasterClient() string {
  960. if x != nil {
  961. return x.MasterClient
  962. }
  963. return ""
  964. }
  965. func (x *ErasureCodingTaskParams) GetCleanupSource() bool {
  966. if x != nil {
  967. return x.CleanupSource
  968. }
  969. return false
  970. }
  971. // TaskSource represents a unified source location for any task type
  972. type TaskSource struct {
  973. state protoimpl.MessageState `protogen:"open.v1"`
  974. Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Source server address
  975. DiskId uint32 `protobuf:"varint,2,opt,name=disk_id,json=diskId,proto3" json:"disk_id,omitempty"` // Source disk ID
  976. Rack string `protobuf:"bytes,3,opt,name=rack,proto3" json:"rack,omitempty"` // Source rack for tracking
  977. DataCenter string `protobuf:"bytes,4,opt,name=data_center,json=dataCenter,proto3" json:"data_center,omitempty"` // Source data center for tracking
  978. VolumeId uint32 `protobuf:"varint,5,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // Volume ID (for volume operations)
  979. ShardIds []uint32 `protobuf:"varint,6,rep,packed,name=shard_ids,json=shardIds,proto3" json:"shard_ids,omitempty"` // Shard IDs (for EC shard operations)
  980. EstimatedSize uint64 `protobuf:"varint,7,opt,name=estimated_size,json=estimatedSize,proto3" json:"estimated_size,omitempty"` // Estimated size to be processed
  981. unknownFields protoimpl.UnknownFields
  982. sizeCache protoimpl.SizeCache
  983. }
  984. func (x *TaskSource) Reset() {
  985. *x = TaskSource{}
  986. mi := &file_worker_proto_msgTypes[11]
  987. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  988. ms.StoreMessageInfo(mi)
  989. }
  990. func (x *TaskSource) String() string {
  991. return protoimpl.X.MessageStringOf(x)
  992. }
  993. func (*TaskSource) ProtoMessage() {}
  994. func (x *TaskSource) ProtoReflect() protoreflect.Message {
  995. mi := &file_worker_proto_msgTypes[11]
  996. if x != nil {
  997. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  998. if ms.LoadMessageInfo() == nil {
  999. ms.StoreMessageInfo(mi)
  1000. }
  1001. return ms
  1002. }
  1003. return mi.MessageOf(x)
  1004. }
  1005. // Deprecated: Use TaskSource.ProtoReflect.Descriptor instead.
  1006. func (*TaskSource) Descriptor() ([]byte, []int) {
  1007. return file_worker_proto_rawDescGZIP(), []int{11}
  1008. }
  1009. func (x *TaskSource) GetNode() string {
  1010. if x != nil {
  1011. return x.Node
  1012. }
  1013. return ""
  1014. }
  1015. func (x *TaskSource) GetDiskId() uint32 {
  1016. if x != nil {
  1017. return x.DiskId
  1018. }
  1019. return 0
  1020. }
  1021. func (x *TaskSource) GetRack() string {
  1022. if x != nil {
  1023. return x.Rack
  1024. }
  1025. return ""
  1026. }
  1027. func (x *TaskSource) GetDataCenter() string {
  1028. if x != nil {
  1029. return x.DataCenter
  1030. }
  1031. return ""
  1032. }
  1033. func (x *TaskSource) GetVolumeId() uint32 {
  1034. if x != nil {
  1035. return x.VolumeId
  1036. }
  1037. return 0
  1038. }
  1039. func (x *TaskSource) GetShardIds() []uint32 {
  1040. if x != nil {
  1041. return x.ShardIds
  1042. }
  1043. return nil
  1044. }
  1045. func (x *TaskSource) GetEstimatedSize() uint64 {
  1046. if x != nil {
  1047. return x.EstimatedSize
  1048. }
  1049. return 0
  1050. }
  1051. // TaskTarget represents a unified target location for any task type
  1052. type TaskTarget struct {
  1053. state protoimpl.MessageState `protogen:"open.v1"`
  1054. Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // Target server address
  1055. DiskId uint32 `protobuf:"varint,2,opt,name=disk_id,json=diskId,proto3" json:"disk_id,omitempty"` // Target disk ID
  1056. Rack string `protobuf:"bytes,3,opt,name=rack,proto3" json:"rack,omitempty"` // Target rack for tracking
  1057. DataCenter string `protobuf:"bytes,4,opt,name=data_center,json=dataCenter,proto3" json:"data_center,omitempty"` // Target data center for tracking
  1058. VolumeId uint32 `protobuf:"varint,5,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` // Volume ID (for volume operations)
  1059. ShardIds []uint32 `protobuf:"varint,6,rep,packed,name=shard_ids,json=shardIds,proto3" json:"shard_ids,omitempty"` // Shard IDs (for EC shard operations)
  1060. EstimatedSize uint64 `protobuf:"varint,7,opt,name=estimated_size,json=estimatedSize,proto3" json:"estimated_size,omitempty"` // Estimated size to be created
  1061. unknownFields protoimpl.UnknownFields
  1062. sizeCache protoimpl.SizeCache
  1063. }
  1064. func (x *TaskTarget) Reset() {
  1065. *x = TaskTarget{}
  1066. mi := &file_worker_proto_msgTypes[12]
  1067. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1068. ms.StoreMessageInfo(mi)
  1069. }
  1070. func (x *TaskTarget) String() string {
  1071. return protoimpl.X.MessageStringOf(x)
  1072. }
  1073. func (*TaskTarget) ProtoMessage() {}
  1074. func (x *TaskTarget) ProtoReflect() protoreflect.Message {
  1075. mi := &file_worker_proto_msgTypes[12]
  1076. if x != nil {
  1077. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1078. if ms.LoadMessageInfo() == nil {
  1079. ms.StoreMessageInfo(mi)
  1080. }
  1081. return ms
  1082. }
  1083. return mi.MessageOf(x)
  1084. }
  1085. // Deprecated: Use TaskTarget.ProtoReflect.Descriptor instead.
  1086. func (*TaskTarget) Descriptor() ([]byte, []int) {
  1087. return file_worker_proto_rawDescGZIP(), []int{12}
  1088. }
  1089. func (x *TaskTarget) GetNode() string {
  1090. if x != nil {
  1091. return x.Node
  1092. }
  1093. return ""
  1094. }
  1095. func (x *TaskTarget) GetDiskId() uint32 {
  1096. if x != nil {
  1097. return x.DiskId
  1098. }
  1099. return 0
  1100. }
  1101. func (x *TaskTarget) GetRack() string {
  1102. if x != nil {
  1103. return x.Rack
  1104. }
  1105. return ""
  1106. }
  1107. func (x *TaskTarget) GetDataCenter() string {
  1108. if x != nil {
  1109. return x.DataCenter
  1110. }
  1111. return ""
  1112. }
  1113. func (x *TaskTarget) GetVolumeId() uint32 {
  1114. if x != nil {
  1115. return x.VolumeId
  1116. }
  1117. return 0
  1118. }
  1119. func (x *TaskTarget) GetShardIds() []uint32 {
  1120. if x != nil {
  1121. return x.ShardIds
  1122. }
  1123. return nil
  1124. }
  1125. func (x *TaskTarget) GetEstimatedSize() uint64 {
  1126. if x != nil {
  1127. return x.EstimatedSize
  1128. }
  1129. return 0
  1130. }
  1131. // BalanceTaskParams for volume balancing operations
  1132. type BalanceTaskParams struct {
  1133. state protoimpl.MessageState `protogen:"open.v1"`
  1134. ForceMove bool `protobuf:"varint,1,opt,name=force_move,json=forceMove,proto3" json:"force_move,omitempty"` // Force move even with conflicts
  1135. TimeoutSeconds int32 `protobuf:"varint,2,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` // Operation timeout
  1136. unknownFields protoimpl.UnknownFields
  1137. sizeCache protoimpl.SizeCache
  1138. }
  1139. func (x *BalanceTaskParams) Reset() {
  1140. *x = BalanceTaskParams{}
  1141. mi := &file_worker_proto_msgTypes[13]
  1142. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1143. ms.StoreMessageInfo(mi)
  1144. }
  1145. func (x *BalanceTaskParams) String() string {
  1146. return protoimpl.X.MessageStringOf(x)
  1147. }
  1148. func (*BalanceTaskParams) ProtoMessage() {}
  1149. func (x *BalanceTaskParams) ProtoReflect() protoreflect.Message {
  1150. mi := &file_worker_proto_msgTypes[13]
  1151. if x != nil {
  1152. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1153. if ms.LoadMessageInfo() == nil {
  1154. ms.StoreMessageInfo(mi)
  1155. }
  1156. return ms
  1157. }
  1158. return mi.MessageOf(x)
  1159. }
  1160. // Deprecated: Use BalanceTaskParams.ProtoReflect.Descriptor instead.
  1161. func (*BalanceTaskParams) Descriptor() ([]byte, []int) {
  1162. return file_worker_proto_rawDescGZIP(), []int{13}
  1163. }
  1164. func (x *BalanceTaskParams) GetForceMove() bool {
  1165. if x != nil {
  1166. return x.ForceMove
  1167. }
  1168. return false
  1169. }
  1170. func (x *BalanceTaskParams) GetTimeoutSeconds() int32 {
  1171. if x != nil {
  1172. return x.TimeoutSeconds
  1173. }
  1174. return 0
  1175. }
  1176. // ReplicationTaskParams for adding replicas
  1177. type ReplicationTaskParams struct {
  1178. state protoimpl.MessageState `protogen:"open.v1"`
  1179. ReplicaCount int32 `protobuf:"varint,1,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"` // Target replica count
  1180. VerifyConsistency bool `protobuf:"varint,2,opt,name=verify_consistency,json=verifyConsistency,proto3" json:"verify_consistency,omitempty"` // Verify replica consistency after creation
  1181. unknownFields protoimpl.UnknownFields
  1182. sizeCache protoimpl.SizeCache
  1183. }
  1184. func (x *ReplicationTaskParams) Reset() {
  1185. *x = ReplicationTaskParams{}
  1186. mi := &file_worker_proto_msgTypes[14]
  1187. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1188. ms.StoreMessageInfo(mi)
  1189. }
  1190. func (x *ReplicationTaskParams) String() string {
  1191. return protoimpl.X.MessageStringOf(x)
  1192. }
  1193. func (*ReplicationTaskParams) ProtoMessage() {}
  1194. func (x *ReplicationTaskParams) ProtoReflect() protoreflect.Message {
  1195. mi := &file_worker_proto_msgTypes[14]
  1196. if x != nil {
  1197. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1198. if ms.LoadMessageInfo() == nil {
  1199. ms.StoreMessageInfo(mi)
  1200. }
  1201. return ms
  1202. }
  1203. return mi.MessageOf(x)
  1204. }
  1205. // Deprecated: Use ReplicationTaskParams.ProtoReflect.Descriptor instead.
  1206. func (*ReplicationTaskParams) Descriptor() ([]byte, []int) {
  1207. return file_worker_proto_rawDescGZIP(), []int{14}
  1208. }
  1209. func (x *ReplicationTaskParams) GetReplicaCount() int32 {
  1210. if x != nil {
  1211. return x.ReplicaCount
  1212. }
  1213. return 0
  1214. }
  1215. func (x *ReplicationTaskParams) GetVerifyConsistency() bool {
  1216. if x != nil {
  1217. return x.VerifyConsistency
  1218. }
  1219. return false
  1220. }
  1221. // TaskUpdate reports task progress
  1222. type TaskUpdate struct {
  1223. state protoimpl.MessageState `protogen:"open.v1"`
  1224. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  1225. WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  1226. Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
  1227. Progress float32 `protobuf:"fixed32,4,opt,name=progress,proto3" json:"progress,omitempty"`
  1228. Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
  1229. Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  1230. unknownFields protoimpl.UnknownFields
  1231. sizeCache protoimpl.SizeCache
  1232. }
  1233. func (x *TaskUpdate) Reset() {
  1234. *x = TaskUpdate{}
  1235. mi := &file_worker_proto_msgTypes[15]
  1236. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1237. ms.StoreMessageInfo(mi)
  1238. }
  1239. func (x *TaskUpdate) String() string {
  1240. return protoimpl.X.MessageStringOf(x)
  1241. }
  1242. func (*TaskUpdate) ProtoMessage() {}
  1243. func (x *TaskUpdate) ProtoReflect() protoreflect.Message {
  1244. mi := &file_worker_proto_msgTypes[15]
  1245. if x != nil {
  1246. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1247. if ms.LoadMessageInfo() == nil {
  1248. ms.StoreMessageInfo(mi)
  1249. }
  1250. return ms
  1251. }
  1252. return mi.MessageOf(x)
  1253. }
  1254. // Deprecated: Use TaskUpdate.ProtoReflect.Descriptor instead.
  1255. func (*TaskUpdate) Descriptor() ([]byte, []int) {
  1256. return file_worker_proto_rawDescGZIP(), []int{15}
  1257. }
  1258. func (x *TaskUpdate) GetTaskId() string {
  1259. if x != nil {
  1260. return x.TaskId
  1261. }
  1262. return ""
  1263. }
  1264. func (x *TaskUpdate) GetWorkerId() string {
  1265. if x != nil {
  1266. return x.WorkerId
  1267. }
  1268. return ""
  1269. }
  1270. func (x *TaskUpdate) GetStatus() string {
  1271. if x != nil {
  1272. return x.Status
  1273. }
  1274. return ""
  1275. }
  1276. func (x *TaskUpdate) GetProgress() float32 {
  1277. if x != nil {
  1278. return x.Progress
  1279. }
  1280. return 0
  1281. }
  1282. func (x *TaskUpdate) GetMessage() string {
  1283. if x != nil {
  1284. return x.Message
  1285. }
  1286. return ""
  1287. }
  1288. func (x *TaskUpdate) GetMetadata() map[string]string {
  1289. if x != nil {
  1290. return x.Metadata
  1291. }
  1292. return nil
  1293. }
  1294. // TaskComplete reports task completion
  1295. type TaskComplete struct {
  1296. state protoimpl.MessageState `protogen:"open.v1"`
  1297. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  1298. WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  1299. Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
  1300. ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
  1301. CompletionTime int64 `protobuf:"varint,5,opt,name=completion_time,json=completionTime,proto3" json:"completion_time,omitempty"`
  1302. ResultMetadata map[string]string `protobuf:"bytes,6,rep,name=result_metadata,json=resultMetadata,proto3" json:"result_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  1303. unknownFields protoimpl.UnknownFields
  1304. sizeCache protoimpl.SizeCache
  1305. }
  1306. func (x *TaskComplete) Reset() {
  1307. *x = TaskComplete{}
  1308. mi := &file_worker_proto_msgTypes[16]
  1309. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1310. ms.StoreMessageInfo(mi)
  1311. }
  1312. func (x *TaskComplete) String() string {
  1313. return protoimpl.X.MessageStringOf(x)
  1314. }
  1315. func (*TaskComplete) ProtoMessage() {}
  1316. func (x *TaskComplete) ProtoReflect() protoreflect.Message {
  1317. mi := &file_worker_proto_msgTypes[16]
  1318. if x != nil {
  1319. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1320. if ms.LoadMessageInfo() == nil {
  1321. ms.StoreMessageInfo(mi)
  1322. }
  1323. return ms
  1324. }
  1325. return mi.MessageOf(x)
  1326. }
  1327. // Deprecated: Use TaskComplete.ProtoReflect.Descriptor instead.
  1328. func (*TaskComplete) Descriptor() ([]byte, []int) {
  1329. return file_worker_proto_rawDescGZIP(), []int{16}
  1330. }
  1331. func (x *TaskComplete) GetTaskId() string {
  1332. if x != nil {
  1333. return x.TaskId
  1334. }
  1335. return ""
  1336. }
  1337. func (x *TaskComplete) GetWorkerId() string {
  1338. if x != nil {
  1339. return x.WorkerId
  1340. }
  1341. return ""
  1342. }
  1343. func (x *TaskComplete) GetSuccess() bool {
  1344. if x != nil {
  1345. return x.Success
  1346. }
  1347. return false
  1348. }
  1349. func (x *TaskComplete) GetErrorMessage() string {
  1350. if x != nil {
  1351. return x.ErrorMessage
  1352. }
  1353. return ""
  1354. }
  1355. func (x *TaskComplete) GetCompletionTime() int64 {
  1356. if x != nil {
  1357. return x.CompletionTime
  1358. }
  1359. return 0
  1360. }
  1361. func (x *TaskComplete) GetResultMetadata() map[string]string {
  1362. if x != nil {
  1363. return x.ResultMetadata
  1364. }
  1365. return nil
  1366. }
  1367. // TaskCancellation from admin to cancel a task
  1368. type TaskCancellation struct {
  1369. state protoimpl.MessageState `protogen:"open.v1"`
  1370. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  1371. Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
  1372. Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"`
  1373. unknownFields protoimpl.UnknownFields
  1374. sizeCache protoimpl.SizeCache
  1375. }
  1376. func (x *TaskCancellation) Reset() {
  1377. *x = TaskCancellation{}
  1378. mi := &file_worker_proto_msgTypes[17]
  1379. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1380. ms.StoreMessageInfo(mi)
  1381. }
  1382. func (x *TaskCancellation) String() string {
  1383. return protoimpl.X.MessageStringOf(x)
  1384. }
  1385. func (*TaskCancellation) ProtoMessage() {}
  1386. func (x *TaskCancellation) ProtoReflect() protoreflect.Message {
  1387. mi := &file_worker_proto_msgTypes[17]
  1388. if x != nil {
  1389. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1390. if ms.LoadMessageInfo() == nil {
  1391. ms.StoreMessageInfo(mi)
  1392. }
  1393. return ms
  1394. }
  1395. return mi.MessageOf(x)
  1396. }
  1397. // Deprecated: Use TaskCancellation.ProtoReflect.Descriptor instead.
  1398. func (*TaskCancellation) Descriptor() ([]byte, []int) {
  1399. return file_worker_proto_rawDescGZIP(), []int{17}
  1400. }
  1401. func (x *TaskCancellation) GetTaskId() string {
  1402. if x != nil {
  1403. return x.TaskId
  1404. }
  1405. return ""
  1406. }
  1407. func (x *TaskCancellation) GetReason() string {
  1408. if x != nil {
  1409. return x.Reason
  1410. }
  1411. return ""
  1412. }
  1413. func (x *TaskCancellation) GetForce() bool {
  1414. if x != nil {
  1415. return x.Force
  1416. }
  1417. return false
  1418. }
  1419. // WorkerShutdown notifies admin that worker is shutting down
  1420. type WorkerShutdown struct {
  1421. state protoimpl.MessageState `protogen:"open.v1"`
  1422. WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  1423. Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
  1424. PendingTaskIds []string `protobuf:"bytes,3,rep,name=pending_task_ids,json=pendingTaskIds,proto3" json:"pending_task_ids,omitempty"`
  1425. unknownFields protoimpl.UnknownFields
  1426. sizeCache protoimpl.SizeCache
  1427. }
  1428. func (x *WorkerShutdown) Reset() {
  1429. *x = WorkerShutdown{}
  1430. mi := &file_worker_proto_msgTypes[18]
  1431. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1432. ms.StoreMessageInfo(mi)
  1433. }
  1434. func (x *WorkerShutdown) String() string {
  1435. return protoimpl.X.MessageStringOf(x)
  1436. }
  1437. func (*WorkerShutdown) ProtoMessage() {}
  1438. func (x *WorkerShutdown) ProtoReflect() protoreflect.Message {
  1439. mi := &file_worker_proto_msgTypes[18]
  1440. if x != nil {
  1441. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1442. if ms.LoadMessageInfo() == nil {
  1443. ms.StoreMessageInfo(mi)
  1444. }
  1445. return ms
  1446. }
  1447. return mi.MessageOf(x)
  1448. }
  1449. // Deprecated: Use WorkerShutdown.ProtoReflect.Descriptor instead.
  1450. func (*WorkerShutdown) Descriptor() ([]byte, []int) {
  1451. return file_worker_proto_rawDescGZIP(), []int{18}
  1452. }
  1453. func (x *WorkerShutdown) GetWorkerId() string {
  1454. if x != nil {
  1455. return x.WorkerId
  1456. }
  1457. return ""
  1458. }
  1459. func (x *WorkerShutdown) GetReason() string {
  1460. if x != nil {
  1461. return x.Reason
  1462. }
  1463. return ""
  1464. }
  1465. func (x *WorkerShutdown) GetPendingTaskIds() []string {
  1466. if x != nil {
  1467. return x.PendingTaskIds
  1468. }
  1469. return nil
  1470. }
  1471. // AdminShutdown notifies worker that admin is shutting down
  1472. type AdminShutdown struct {
  1473. state protoimpl.MessageState `protogen:"open.v1"`
  1474. Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
  1475. GracefulShutdownSeconds int32 `protobuf:"varint,2,opt,name=graceful_shutdown_seconds,json=gracefulShutdownSeconds,proto3" json:"graceful_shutdown_seconds,omitempty"`
  1476. unknownFields protoimpl.UnknownFields
  1477. sizeCache protoimpl.SizeCache
  1478. }
  1479. func (x *AdminShutdown) Reset() {
  1480. *x = AdminShutdown{}
  1481. mi := &file_worker_proto_msgTypes[19]
  1482. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1483. ms.StoreMessageInfo(mi)
  1484. }
  1485. func (x *AdminShutdown) String() string {
  1486. return protoimpl.X.MessageStringOf(x)
  1487. }
  1488. func (*AdminShutdown) ProtoMessage() {}
  1489. func (x *AdminShutdown) ProtoReflect() protoreflect.Message {
  1490. mi := &file_worker_proto_msgTypes[19]
  1491. if x != nil {
  1492. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1493. if ms.LoadMessageInfo() == nil {
  1494. ms.StoreMessageInfo(mi)
  1495. }
  1496. return ms
  1497. }
  1498. return mi.MessageOf(x)
  1499. }
  1500. // Deprecated: Use AdminShutdown.ProtoReflect.Descriptor instead.
  1501. func (*AdminShutdown) Descriptor() ([]byte, []int) {
  1502. return file_worker_proto_rawDescGZIP(), []int{19}
  1503. }
  1504. func (x *AdminShutdown) GetReason() string {
  1505. if x != nil {
  1506. return x.Reason
  1507. }
  1508. return ""
  1509. }
  1510. func (x *AdminShutdown) GetGracefulShutdownSeconds() int32 {
  1511. if x != nil {
  1512. return x.GracefulShutdownSeconds
  1513. }
  1514. return 0
  1515. }
  1516. // TaskLogRequest requests logs for a specific task
  1517. type TaskLogRequest struct {
  1518. state protoimpl.MessageState `protogen:"open.v1"`
  1519. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  1520. WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  1521. IncludeMetadata bool `protobuf:"varint,3,opt,name=include_metadata,json=includeMetadata,proto3" json:"include_metadata,omitempty"` // Include task metadata
  1522. MaxEntries int32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` // Maximum number of log entries (0 = all)
  1523. LogLevel string `protobuf:"bytes,5,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` // Filter by log level (INFO, WARNING, ERROR, DEBUG)
  1524. StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Unix timestamp for start time filter
  1525. EndTime int64 `protobuf:"varint,7,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Unix timestamp for end time filter
  1526. unknownFields protoimpl.UnknownFields
  1527. sizeCache protoimpl.SizeCache
  1528. }
  1529. func (x *TaskLogRequest) Reset() {
  1530. *x = TaskLogRequest{}
  1531. mi := &file_worker_proto_msgTypes[20]
  1532. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1533. ms.StoreMessageInfo(mi)
  1534. }
  1535. func (x *TaskLogRequest) String() string {
  1536. return protoimpl.X.MessageStringOf(x)
  1537. }
  1538. func (*TaskLogRequest) ProtoMessage() {}
  1539. func (x *TaskLogRequest) ProtoReflect() protoreflect.Message {
  1540. mi := &file_worker_proto_msgTypes[20]
  1541. if x != nil {
  1542. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1543. if ms.LoadMessageInfo() == nil {
  1544. ms.StoreMessageInfo(mi)
  1545. }
  1546. return ms
  1547. }
  1548. return mi.MessageOf(x)
  1549. }
  1550. // Deprecated: Use TaskLogRequest.ProtoReflect.Descriptor instead.
  1551. func (*TaskLogRequest) Descriptor() ([]byte, []int) {
  1552. return file_worker_proto_rawDescGZIP(), []int{20}
  1553. }
  1554. func (x *TaskLogRequest) GetTaskId() string {
  1555. if x != nil {
  1556. return x.TaskId
  1557. }
  1558. return ""
  1559. }
  1560. func (x *TaskLogRequest) GetWorkerId() string {
  1561. if x != nil {
  1562. return x.WorkerId
  1563. }
  1564. return ""
  1565. }
  1566. func (x *TaskLogRequest) GetIncludeMetadata() bool {
  1567. if x != nil {
  1568. return x.IncludeMetadata
  1569. }
  1570. return false
  1571. }
  1572. func (x *TaskLogRequest) GetMaxEntries() int32 {
  1573. if x != nil {
  1574. return x.MaxEntries
  1575. }
  1576. return 0
  1577. }
  1578. func (x *TaskLogRequest) GetLogLevel() string {
  1579. if x != nil {
  1580. return x.LogLevel
  1581. }
  1582. return ""
  1583. }
  1584. func (x *TaskLogRequest) GetStartTime() int64 {
  1585. if x != nil {
  1586. return x.StartTime
  1587. }
  1588. return 0
  1589. }
  1590. func (x *TaskLogRequest) GetEndTime() int64 {
  1591. if x != nil {
  1592. return x.EndTime
  1593. }
  1594. return 0
  1595. }
  1596. // TaskLogResponse returns task logs and metadata
  1597. type TaskLogResponse struct {
  1598. state protoimpl.MessageState `protogen:"open.v1"`
  1599. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  1600. WorkerId string `protobuf:"bytes,2,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  1601. Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
  1602. ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
  1603. Metadata *TaskLogMetadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
  1604. LogEntries []*TaskLogEntry `protobuf:"bytes,6,rep,name=log_entries,json=logEntries,proto3" json:"log_entries,omitempty"`
  1605. unknownFields protoimpl.UnknownFields
  1606. sizeCache protoimpl.SizeCache
  1607. }
  1608. func (x *TaskLogResponse) Reset() {
  1609. *x = TaskLogResponse{}
  1610. mi := &file_worker_proto_msgTypes[21]
  1611. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1612. ms.StoreMessageInfo(mi)
  1613. }
  1614. func (x *TaskLogResponse) String() string {
  1615. return protoimpl.X.MessageStringOf(x)
  1616. }
  1617. func (*TaskLogResponse) ProtoMessage() {}
  1618. func (x *TaskLogResponse) ProtoReflect() protoreflect.Message {
  1619. mi := &file_worker_proto_msgTypes[21]
  1620. if x != nil {
  1621. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1622. if ms.LoadMessageInfo() == nil {
  1623. ms.StoreMessageInfo(mi)
  1624. }
  1625. return ms
  1626. }
  1627. return mi.MessageOf(x)
  1628. }
  1629. // Deprecated: Use TaskLogResponse.ProtoReflect.Descriptor instead.
  1630. func (*TaskLogResponse) Descriptor() ([]byte, []int) {
  1631. return file_worker_proto_rawDescGZIP(), []int{21}
  1632. }
  1633. func (x *TaskLogResponse) GetTaskId() string {
  1634. if x != nil {
  1635. return x.TaskId
  1636. }
  1637. return ""
  1638. }
  1639. func (x *TaskLogResponse) GetWorkerId() string {
  1640. if x != nil {
  1641. return x.WorkerId
  1642. }
  1643. return ""
  1644. }
  1645. func (x *TaskLogResponse) GetSuccess() bool {
  1646. if x != nil {
  1647. return x.Success
  1648. }
  1649. return false
  1650. }
  1651. func (x *TaskLogResponse) GetErrorMessage() string {
  1652. if x != nil {
  1653. return x.ErrorMessage
  1654. }
  1655. return ""
  1656. }
  1657. func (x *TaskLogResponse) GetMetadata() *TaskLogMetadata {
  1658. if x != nil {
  1659. return x.Metadata
  1660. }
  1661. return nil
  1662. }
  1663. func (x *TaskLogResponse) GetLogEntries() []*TaskLogEntry {
  1664. if x != nil {
  1665. return x.LogEntries
  1666. }
  1667. return nil
  1668. }
  1669. // TaskLogMetadata contains metadata about task execution
  1670. type TaskLogMetadata struct {
  1671. state protoimpl.MessageState `protogen:"open.v1"`
  1672. TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  1673. TaskType string `protobuf:"bytes,2,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
  1674. WorkerId string `protobuf:"bytes,3,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  1675. StartTime int64 `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
  1676. EndTime int64 `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
  1677. DurationMs int64 `protobuf:"varint,6,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
  1678. Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
  1679. Progress float32 `protobuf:"fixed32,8,opt,name=progress,proto3" json:"progress,omitempty"`
  1680. VolumeId uint32 `protobuf:"varint,9,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
  1681. Server string `protobuf:"bytes,10,opt,name=server,proto3" json:"server,omitempty"`
  1682. Collection string `protobuf:"bytes,11,opt,name=collection,proto3" json:"collection,omitempty"`
  1683. LogFilePath string `protobuf:"bytes,12,opt,name=log_file_path,json=logFilePath,proto3" json:"log_file_path,omitempty"`
  1684. CreatedAt int64 `protobuf:"varint,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
  1685. CustomData map[string]string `protobuf:"bytes,14,rep,name=custom_data,json=customData,proto3" json:"custom_data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  1686. unknownFields protoimpl.UnknownFields
  1687. sizeCache protoimpl.SizeCache
  1688. }
  1689. func (x *TaskLogMetadata) Reset() {
  1690. *x = TaskLogMetadata{}
  1691. mi := &file_worker_proto_msgTypes[22]
  1692. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1693. ms.StoreMessageInfo(mi)
  1694. }
  1695. func (x *TaskLogMetadata) String() string {
  1696. return protoimpl.X.MessageStringOf(x)
  1697. }
  1698. func (*TaskLogMetadata) ProtoMessage() {}
  1699. func (x *TaskLogMetadata) ProtoReflect() protoreflect.Message {
  1700. mi := &file_worker_proto_msgTypes[22]
  1701. if x != nil {
  1702. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1703. if ms.LoadMessageInfo() == nil {
  1704. ms.StoreMessageInfo(mi)
  1705. }
  1706. return ms
  1707. }
  1708. return mi.MessageOf(x)
  1709. }
  1710. // Deprecated: Use TaskLogMetadata.ProtoReflect.Descriptor instead.
  1711. func (*TaskLogMetadata) Descriptor() ([]byte, []int) {
  1712. return file_worker_proto_rawDescGZIP(), []int{22}
  1713. }
  1714. func (x *TaskLogMetadata) GetTaskId() string {
  1715. if x != nil {
  1716. return x.TaskId
  1717. }
  1718. return ""
  1719. }
  1720. func (x *TaskLogMetadata) GetTaskType() string {
  1721. if x != nil {
  1722. return x.TaskType
  1723. }
  1724. return ""
  1725. }
  1726. func (x *TaskLogMetadata) GetWorkerId() string {
  1727. if x != nil {
  1728. return x.WorkerId
  1729. }
  1730. return ""
  1731. }
  1732. func (x *TaskLogMetadata) GetStartTime() int64 {
  1733. if x != nil {
  1734. return x.StartTime
  1735. }
  1736. return 0
  1737. }
  1738. func (x *TaskLogMetadata) GetEndTime() int64 {
  1739. if x != nil {
  1740. return x.EndTime
  1741. }
  1742. return 0
  1743. }
  1744. func (x *TaskLogMetadata) GetDurationMs() int64 {
  1745. if x != nil {
  1746. return x.DurationMs
  1747. }
  1748. return 0
  1749. }
  1750. func (x *TaskLogMetadata) GetStatus() string {
  1751. if x != nil {
  1752. return x.Status
  1753. }
  1754. return ""
  1755. }
  1756. func (x *TaskLogMetadata) GetProgress() float32 {
  1757. if x != nil {
  1758. return x.Progress
  1759. }
  1760. return 0
  1761. }
  1762. func (x *TaskLogMetadata) GetVolumeId() uint32 {
  1763. if x != nil {
  1764. return x.VolumeId
  1765. }
  1766. return 0
  1767. }
  1768. func (x *TaskLogMetadata) GetServer() string {
  1769. if x != nil {
  1770. return x.Server
  1771. }
  1772. return ""
  1773. }
  1774. func (x *TaskLogMetadata) GetCollection() string {
  1775. if x != nil {
  1776. return x.Collection
  1777. }
  1778. return ""
  1779. }
  1780. func (x *TaskLogMetadata) GetLogFilePath() string {
  1781. if x != nil {
  1782. return x.LogFilePath
  1783. }
  1784. return ""
  1785. }
  1786. func (x *TaskLogMetadata) GetCreatedAt() int64 {
  1787. if x != nil {
  1788. return x.CreatedAt
  1789. }
  1790. return 0
  1791. }
  1792. func (x *TaskLogMetadata) GetCustomData() map[string]string {
  1793. if x != nil {
  1794. return x.CustomData
  1795. }
  1796. return nil
  1797. }
  1798. // TaskLogEntry represents a single log entry
  1799. type TaskLogEntry struct {
  1800. state protoimpl.MessageState `protogen:"open.v1"`
  1801. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
  1802. Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"`
  1803. Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
  1804. Fields map[string]string `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  1805. Progress float32 `protobuf:"fixed32,5,opt,name=progress,proto3" json:"progress,omitempty"`
  1806. Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
  1807. unknownFields protoimpl.UnknownFields
  1808. sizeCache protoimpl.SizeCache
  1809. }
  1810. func (x *TaskLogEntry) Reset() {
  1811. *x = TaskLogEntry{}
  1812. mi := &file_worker_proto_msgTypes[23]
  1813. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1814. ms.StoreMessageInfo(mi)
  1815. }
  1816. func (x *TaskLogEntry) String() string {
  1817. return protoimpl.X.MessageStringOf(x)
  1818. }
  1819. func (*TaskLogEntry) ProtoMessage() {}
  1820. func (x *TaskLogEntry) ProtoReflect() protoreflect.Message {
  1821. mi := &file_worker_proto_msgTypes[23]
  1822. if x != nil {
  1823. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1824. if ms.LoadMessageInfo() == nil {
  1825. ms.StoreMessageInfo(mi)
  1826. }
  1827. return ms
  1828. }
  1829. return mi.MessageOf(x)
  1830. }
  1831. // Deprecated: Use TaskLogEntry.ProtoReflect.Descriptor instead.
  1832. func (*TaskLogEntry) Descriptor() ([]byte, []int) {
  1833. return file_worker_proto_rawDescGZIP(), []int{23}
  1834. }
  1835. func (x *TaskLogEntry) GetTimestamp() int64 {
  1836. if x != nil {
  1837. return x.Timestamp
  1838. }
  1839. return 0
  1840. }
  1841. func (x *TaskLogEntry) GetLevel() string {
  1842. if x != nil {
  1843. return x.Level
  1844. }
  1845. return ""
  1846. }
  1847. func (x *TaskLogEntry) GetMessage() string {
  1848. if x != nil {
  1849. return x.Message
  1850. }
  1851. return ""
  1852. }
  1853. func (x *TaskLogEntry) GetFields() map[string]string {
  1854. if x != nil {
  1855. return x.Fields
  1856. }
  1857. return nil
  1858. }
  1859. func (x *TaskLogEntry) GetProgress() float32 {
  1860. if x != nil {
  1861. return x.Progress
  1862. }
  1863. return 0
  1864. }
  1865. func (x *TaskLogEntry) GetStatus() string {
  1866. if x != nil {
  1867. return x.Status
  1868. }
  1869. return ""
  1870. }
  1871. // MaintenanceConfig holds configuration for the maintenance system
  1872. type MaintenanceConfig struct {
  1873. state protoimpl.MessageState `protogen:"open.v1"`
  1874. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
  1875. ScanIntervalSeconds int32 `protobuf:"varint,2,opt,name=scan_interval_seconds,json=scanIntervalSeconds,proto3" json:"scan_interval_seconds,omitempty"` // How often to scan for maintenance needs
  1876. WorkerTimeoutSeconds int32 `protobuf:"varint,3,opt,name=worker_timeout_seconds,json=workerTimeoutSeconds,proto3" json:"worker_timeout_seconds,omitempty"` // Worker heartbeat timeout
  1877. TaskTimeoutSeconds int32 `protobuf:"varint,4,opt,name=task_timeout_seconds,json=taskTimeoutSeconds,proto3" json:"task_timeout_seconds,omitempty"` // Individual task timeout
  1878. RetryDelaySeconds int32 `protobuf:"varint,5,opt,name=retry_delay_seconds,json=retryDelaySeconds,proto3" json:"retry_delay_seconds,omitempty"` // Delay between retries
  1879. MaxRetries int32 `protobuf:"varint,6,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` // Default max retries for tasks
  1880. CleanupIntervalSeconds int32 `protobuf:"varint,7,opt,name=cleanup_interval_seconds,json=cleanupIntervalSeconds,proto3" json:"cleanup_interval_seconds,omitempty"` // How often to clean up old tasks
  1881. TaskRetentionSeconds int32 `protobuf:"varint,8,opt,name=task_retention_seconds,json=taskRetentionSeconds,proto3" json:"task_retention_seconds,omitempty"` // How long to keep completed/failed tasks
  1882. Policy *MaintenancePolicy `protobuf:"bytes,9,opt,name=policy,proto3" json:"policy,omitempty"`
  1883. unknownFields protoimpl.UnknownFields
  1884. sizeCache protoimpl.SizeCache
  1885. }
  1886. func (x *MaintenanceConfig) Reset() {
  1887. *x = MaintenanceConfig{}
  1888. mi := &file_worker_proto_msgTypes[24]
  1889. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1890. ms.StoreMessageInfo(mi)
  1891. }
  1892. func (x *MaintenanceConfig) String() string {
  1893. return protoimpl.X.MessageStringOf(x)
  1894. }
  1895. func (*MaintenanceConfig) ProtoMessage() {}
  1896. func (x *MaintenanceConfig) ProtoReflect() protoreflect.Message {
  1897. mi := &file_worker_proto_msgTypes[24]
  1898. if x != nil {
  1899. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1900. if ms.LoadMessageInfo() == nil {
  1901. ms.StoreMessageInfo(mi)
  1902. }
  1903. return ms
  1904. }
  1905. return mi.MessageOf(x)
  1906. }
  1907. // Deprecated: Use MaintenanceConfig.ProtoReflect.Descriptor instead.
  1908. func (*MaintenanceConfig) Descriptor() ([]byte, []int) {
  1909. return file_worker_proto_rawDescGZIP(), []int{24}
  1910. }
  1911. func (x *MaintenanceConfig) GetEnabled() bool {
  1912. if x != nil {
  1913. return x.Enabled
  1914. }
  1915. return false
  1916. }
  1917. func (x *MaintenanceConfig) GetScanIntervalSeconds() int32 {
  1918. if x != nil {
  1919. return x.ScanIntervalSeconds
  1920. }
  1921. return 0
  1922. }
  1923. func (x *MaintenanceConfig) GetWorkerTimeoutSeconds() int32 {
  1924. if x != nil {
  1925. return x.WorkerTimeoutSeconds
  1926. }
  1927. return 0
  1928. }
  1929. func (x *MaintenanceConfig) GetTaskTimeoutSeconds() int32 {
  1930. if x != nil {
  1931. return x.TaskTimeoutSeconds
  1932. }
  1933. return 0
  1934. }
  1935. func (x *MaintenanceConfig) GetRetryDelaySeconds() int32 {
  1936. if x != nil {
  1937. return x.RetryDelaySeconds
  1938. }
  1939. return 0
  1940. }
  1941. func (x *MaintenanceConfig) GetMaxRetries() int32 {
  1942. if x != nil {
  1943. return x.MaxRetries
  1944. }
  1945. return 0
  1946. }
  1947. func (x *MaintenanceConfig) GetCleanupIntervalSeconds() int32 {
  1948. if x != nil {
  1949. return x.CleanupIntervalSeconds
  1950. }
  1951. return 0
  1952. }
  1953. func (x *MaintenanceConfig) GetTaskRetentionSeconds() int32 {
  1954. if x != nil {
  1955. return x.TaskRetentionSeconds
  1956. }
  1957. return 0
  1958. }
  1959. func (x *MaintenanceConfig) GetPolicy() *MaintenancePolicy {
  1960. if x != nil {
  1961. return x.Policy
  1962. }
  1963. return nil
  1964. }
  1965. // MaintenancePolicy defines policies for maintenance operations
  1966. type MaintenancePolicy struct {
  1967. state protoimpl.MessageState `protogen:"open.v1"`
  1968. TaskPolicies map[string]*TaskPolicy `protobuf:"bytes,1,rep,name=task_policies,json=taskPolicies,proto3" json:"task_policies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Task type -> policy mapping
  1969. GlobalMaxConcurrent int32 `protobuf:"varint,2,opt,name=global_max_concurrent,json=globalMaxConcurrent,proto3" json:"global_max_concurrent,omitempty"` // Overall limit across all task types
  1970. DefaultRepeatIntervalSeconds int32 `protobuf:"varint,3,opt,name=default_repeat_interval_seconds,json=defaultRepeatIntervalSeconds,proto3" json:"default_repeat_interval_seconds,omitempty"` // Default seconds if task doesn't specify
  1971. DefaultCheckIntervalSeconds int32 `protobuf:"varint,4,opt,name=default_check_interval_seconds,json=defaultCheckIntervalSeconds,proto3" json:"default_check_interval_seconds,omitempty"` // Default seconds for periodic checks
  1972. unknownFields protoimpl.UnknownFields
  1973. sizeCache protoimpl.SizeCache
  1974. }
  1975. func (x *MaintenancePolicy) Reset() {
  1976. *x = MaintenancePolicy{}
  1977. mi := &file_worker_proto_msgTypes[25]
  1978. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1979. ms.StoreMessageInfo(mi)
  1980. }
  1981. func (x *MaintenancePolicy) String() string {
  1982. return protoimpl.X.MessageStringOf(x)
  1983. }
  1984. func (*MaintenancePolicy) ProtoMessage() {}
  1985. func (x *MaintenancePolicy) ProtoReflect() protoreflect.Message {
  1986. mi := &file_worker_proto_msgTypes[25]
  1987. if x != nil {
  1988. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1989. if ms.LoadMessageInfo() == nil {
  1990. ms.StoreMessageInfo(mi)
  1991. }
  1992. return ms
  1993. }
  1994. return mi.MessageOf(x)
  1995. }
  1996. // Deprecated: Use MaintenancePolicy.ProtoReflect.Descriptor instead.
  1997. func (*MaintenancePolicy) Descriptor() ([]byte, []int) {
  1998. return file_worker_proto_rawDescGZIP(), []int{25}
  1999. }
  2000. func (x *MaintenancePolicy) GetTaskPolicies() map[string]*TaskPolicy {
  2001. if x != nil {
  2002. return x.TaskPolicies
  2003. }
  2004. return nil
  2005. }
  2006. func (x *MaintenancePolicy) GetGlobalMaxConcurrent() int32 {
  2007. if x != nil {
  2008. return x.GlobalMaxConcurrent
  2009. }
  2010. return 0
  2011. }
  2012. func (x *MaintenancePolicy) GetDefaultRepeatIntervalSeconds() int32 {
  2013. if x != nil {
  2014. return x.DefaultRepeatIntervalSeconds
  2015. }
  2016. return 0
  2017. }
  2018. func (x *MaintenancePolicy) GetDefaultCheckIntervalSeconds() int32 {
  2019. if x != nil {
  2020. return x.DefaultCheckIntervalSeconds
  2021. }
  2022. return 0
  2023. }
  2024. // TaskPolicy represents configuration for a specific task type
  2025. type TaskPolicy struct {
  2026. state protoimpl.MessageState `protogen:"open.v1"`
  2027. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
  2028. MaxConcurrent int32 `protobuf:"varint,2,opt,name=max_concurrent,json=maxConcurrent,proto3" json:"max_concurrent,omitempty"`
  2029. RepeatIntervalSeconds int32 `protobuf:"varint,3,opt,name=repeat_interval_seconds,json=repeatIntervalSeconds,proto3" json:"repeat_interval_seconds,omitempty"` // Seconds to wait before repeating
  2030. CheckIntervalSeconds int32 `protobuf:"varint,4,opt,name=check_interval_seconds,json=checkIntervalSeconds,proto3" json:"check_interval_seconds,omitempty"` // Seconds between checks
  2031. // Typed task-specific configuration (replaces generic map)
  2032. //
  2033. // Types that are valid to be assigned to TaskConfig:
  2034. //
  2035. // *TaskPolicy_VacuumConfig
  2036. // *TaskPolicy_ErasureCodingConfig
  2037. // *TaskPolicy_BalanceConfig
  2038. // *TaskPolicy_ReplicationConfig
  2039. TaskConfig isTaskPolicy_TaskConfig `protobuf_oneof:"task_config"`
  2040. unknownFields protoimpl.UnknownFields
  2041. sizeCache protoimpl.SizeCache
  2042. }
  2043. func (x *TaskPolicy) Reset() {
  2044. *x = TaskPolicy{}
  2045. mi := &file_worker_proto_msgTypes[26]
  2046. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2047. ms.StoreMessageInfo(mi)
  2048. }
  2049. func (x *TaskPolicy) String() string {
  2050. return protoimpl.X.MessageStringOf(x)
  2051. }
  2052. func (*TaskPolicy) ProtoMessage() {}
  2053. func (x *TaskPolicy) ProtoReflect() protoreflect.Message {
  2054. mi := &file_worker_proto_msgTypes[26]
  2055. if x != nil {
  2056. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2057. if ms.LoadMessageInfo() == nil {
  2058. ms.StoreMessageInfo(mi)
  2059. }
  2060. return ms
  2061. }
  2062. return mi.MessageOf(x)
  2063. }
  2064. // Deprecated: Use TaskPolicy.ProtoReflect.Descriptor instead.
  2065. func (*TaskPolicy) Descriptor() ([]byte, []int) {
  2066. return file_worker_proto_rawDescGZIP(), []int{26}
  2067. }
  2068. func (x *TaskPolicy) GetEnabled() bool {
  2069. if x != nil {
  2070. return x.Enabled
  2071. }
  2072. return false
  2073. }
  2074. func (x *TaskPolicy) GetMaxConcurrent() int32 {
  2075. if x != nil {
  2076. return x.MaxConcurrent
  2077. }
  2078. return 0
  2079. }
  2080. func (x *TaskPolicy) GetRepeatIntervalSeconds() int32 {
  2081. if x != nil {
  2082. return x.RepeatIntervalSeconds
  2083. }
  2084. return 0
  2085. }
  2086. func (x *TaskPolicy) GetCheckIntervalSeconds() int32 {
  2087. if x != nil {
  2088. return x.CheckIntervalSeconds
  2089. }
  2090. return 0
  2091. }
  2092. func (x *TaskPolicy) GetTaskConfig() isTaskPolicy_TaskConfig {
  2093. if x != nil {
  2094. return x.TaskConfig
  2095. }
  2096. return nil
  2097. }
  2098. func (x *TaskPolicy) GetVacuumConfig() *VacuumTaskConfig {
  2099. if x != nil {
  2100. if x, ok := x.TaskConfig.(*TaskPolicy_VacuumConfig); ok {
  2101. return x.VacuumConfig
  2102. }
  2103. }
  2104. return nil
  2105. }
  2106. func (x *TaskPolicy) GetErasureCodingConfig() *ErasureCodingTaskConfig {
  2107. if x != nil {
  2108. if x, ok := x.TaskConfig.(*TaskPolicy_ErasureCodingConfig); ok {
  2109. return x.ErasureCodingConfig
  2110. }
  2111. }
  2112. return nil
  2113. }
  2114. func (x *TaskPolicy) GetBalanceConfig() *BalanceTaskConfig {
  2115. if x != nil {
  2116. if x, ok := x.TaskConfig.(*TaskPolicy_BalanceConfig); ok {
  2117. return x.BalanceConfig
  2118. }
  2119. }
  2120. return nil
  2121. }
  2122. func (x *TaskPolicy) GetReplicationConfig() *ReplicationTaskConfig {
  2123. if x != nil {
  2124. if x, ok := x.TaskConfig.(*TaskPolicy_ReplicationConfig); ok {
  2125. return x.ReplicationConfig
  2126. }
  2127. }
  2128. return nil
  2129. }
  2130. type isTaskPolicy_TaskConfig interface {
  2131. isTaskPolicy_TaskConfig()
  2132. }
  2133. type TaskPolicy_VacuumConfig struct {
  2134. VacuumConfig *VacuumTaskConfig `protobuf:"bytes,5,opt,name=vacuum_config,json=vacuumConfig,proto3,oneof"`
  2135. }
  2136. type TaskPolicy_ErasureCodingConfig struct {
  2137. ErasureCodingConfig *ErasureCodingTaskConfig `protobuf:"bytes,6,opt,name=erasure_coding_config,json=erasureCodingConfig,proto3,oneof"`
  2138. }
  2139. type TaskPolicy_BalanceConfig struct {
  2140. BalanceConfig *BalanceTaskConfig `protobuf:"bytes,7,opt,name=balance_config,json=balanceConfig,proto3,oneof"`
  2141. }
  2142. type TaskPolicy_ReplicationConfig struct {
  2143. ReplicationConfig *ReplicationTaskConfig `protobuf:"bytes,8,opt,name=replication_config,json=replicationConfig,proto3,oneof"`
  2144. }
  2145. func (*TaskPolicy_VacuumConfig) isTaskPolicy_TaskConfig() {}
  2146. func (*TaskPolicy_ErasureCodingConfig) isTaskPolicy_TaskConfig() {}
  2147. func (*TaskPolicy_BalanceConfig) isTaskPolicy_TaskConfig() {}
  2148. func (*TaskPolicy_ReplicationConfig) isTaskPolicy_TaskConfig() {}
  2149. // VacuumTaskConfig contains vacuum-specific configuration
  2150. type VacuumTaskConfig struct {
  2151. state protoimpl.MessageState `protogen:"open.v1"`
  2152. GarbageThreshold float64 `protobuf:"fixed64,1,opt,name=garbage_threshold,json=garbageThreshold,proto3" json:"garbage_threshold,omitempty"` // Minimum garbage ratio to trigger vacuum (0.0-1.0)
  2153. MinVolumeAgeHours int32 `protobuf:"varint,2,opt,name=min_volume_age_hours,json=minVolumeAgeHours,proto3" json:"min_volume_age_hours,omitempty"` // Minimum age before vacuum is considered
  2154. MinIntervalSeconds int32 `protobuf:"varint,3,opt,name=min_interval_seconds,json=minIntervalSeconds,proto3" json:"min_interval_seconds,omitempty"` // Minimum time between vacuum operations on the same volume
  2155. unknownFields protoimpl.UnknownFields
  2156. sizeCache protoimpl.SizeCache
  2157. }
  2158. func (x *VacuumTaskConfig) Reset() {
  2159. *x = VacuumTaskConfig{}
  2160. mi := &file_worker_proto_msgTypes[27]
  2161. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2162. ms.StoreMessageInfo(mi)
  2163. }
  2164. func (x *VacuumTaskConfig) String() string {
  2165. return protoimpl.X.MessageStringOf(x)
  2166. }
  2167. func (*VacuumTaskConfig) ProtoMessage() {}
  2168. func (x *VacuumTaskConfig) ProtoReflect() protoreflect.Message {
  2169. mi := &file_worker_proto_msgTypes[27]
  2170. if x != nil {
  2171. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2172. if ms.LoadMessageInfo() == nil {
  2173. ms.StoreMessageInfo(mi)
  2174. }
  2175. return ms
  2176. }
  2177. return mi.MessageOf(x)
  2178. }
  2179. // Deprecated: Use VacuumTaskConfig.ProtoReflect.Descriptor instead.
  2180. func (*VacuumTaskConfig) Descriptor() ([]byte, []int) {
  2181. return file_worker_proto_rawDescGZIP(), []int{27}
  2182. }
  2183. func (x *VacuumTaskConfig) GetGarbageThreshold() float64 {
  2184. if x != nil {
  2185. return x.GarbageThreshold
  2186. }
  2187. return 0
  2188. }
  2189. func (x *VacuumTaskConfig) GetMinVolumeAgeHours() int32 {
  2190. if x != nil {
  2191. return x.MinVolumeAgeHours
  2192. }
  2193. return 0
  2194. }
  2195. func (x *VacuumTaskConfig) GetMinIntervalSeconds() int32 {
  2196. if x != nil {
  2197. return x.MinIntervalSeconds
  2198. }
  2199. return 0
  2200. }
  2201. // ErasureCodingTaskConfig contains EC-specific configuration
  2202. type ErasureCodingTaskConfig struct {
  2203. state protoimpl.MessageState `protogen:"open.v1"`
  2204. FullnessRatio float64 `protobuf:"fixed64,1,opt,name=fullness_ratio,json=fullnessRatio,proto3" json:"fullness_ratio,omitempty"` // Minimum fullness ratio to trigger EC (0.0-1.0)
  2205. QuietForSeconds int32 `protobuf:"varint,2,opt,name=quiet_for_seconds,json=quietForSeconds,proto3" json:"quiet_for_seconds,omitempty"` // Minimum quiet time before EC
  2206. MinVolumeSizeMb int32 `protobuf:"varint,3,opt,name=min_volume_size_mb,json=minVolumeSizeMb,proto3" json:"min_volume_size_mb,omitempty"` // Minimum volume size for EC
  2207. CollectionFilter string `protobuf:"bytes,4,opt,name=collection_filter,json=collectionFilter,proto3" json:"collection_filter,omitempty"` // Only process volumes from specific collections
  2208. unknownFields protoimpl.UnknownFields
  2209. sizeCache protoimpl.SizeCache
  2210. }
  2211. func (x *ErasureCodingTaskConfig) Reset() {
  2212. *x = ErasureCodingTaskConfig{}
  2213. mi := &file_worker_proto_msgTypes[28]
  2214. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2215. ms.StoreMessageInfo(mi)
  2216. }
  2217. func (x *ErasureCodingTaskConfig) String() string {
  2218. return protoimpl.X.MessageStringOf(x)
  2219. }
  2220. func (*ErasureCodingTaskConfig) ProtoMessage() {}
  2221. func (x *ErasureCodingTaskConfig) ProtoReflect() protoreflect.Message {
  2222. mi := &file_worker_proto_msgTypes[28]
  2223. if x != nil {
  2224. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2225. if ms.LoadMessageInfo() == nil {
  2226. ms.StoreMessageInfo(mi)
  2227. }
  2228. return ms
  2229. }
  2230. return mi.MessageOf(x)
  2231. }
  2232. // Deprecated: Use ErasureCodingTaskConfig.ProtoReflect.Descriptor instead.
  2233. func (*ErasureCodingTaskConfig) Descriptor() ([]byte, []int) {
  2234. return file_worker_proto_rawDescGZIP(), []int{28}
  2235. }
  2236. func (x *ErasureCodingTaskConfig) GetFullnessRatio() float64 {
  2237. if x != nil {
  2238. return x.FullnessRatio
  2239. }
  2240. return 0
  2241. }
  2242. func (x *ErasureCodingTaskConfig) GetQuietForSeconds() int32 {
  2243. if x != nil {
  2244. return x.QuietForSeconds
  2245. }
  2246. return 0
  2247. }
  2248. func (x *ErasureCodingTaskConfig) GetMinVolumeSizeMb() int32 {
  2249. if x != nil {
  2250. return x.MinVolumeSizeMb
  2251. }
  2252. return 0
  2253. }
  2254. func (x *ErasureCodingTaskConfig) GetCollectionFilter() string {
  2255. if x != nil {
  2256. return x.CollectionFilter
  2257. }
  2258. return ""
  2259. }
  2260. // BalanceTaskConfig contains balance-specific configuration
  2261. type BalanceTaskConfig struct {
  2262. state protoimpl.MessageState `protogen:"open.v1"`
  2263. ImbalanceThreshold float64 `protobuf:"fixed64,1,opt,name=imbalance_threshold,json=imbalanceThreshold,proto3" json:"imbalance_threshold,omitempty"` // Threshold for triggering rebalancing (0.0-1.0)
  2264. MinServerCount int32 `protobuf:"varint,2,opt,name=min_server_count,json=minServerCount,proto3" json:"min_server_count,omitempty"` // Minimum number of servers required for balancing
  2265. unknownFields protoimpl.UnknownFields
  2266. sizeCache protoimpl.SizeCache
  2267. }
  2268. func (x *BalanceTaskConfig) Reset() {
  2269. *x = BalanceTaskConfig{}
  2270. mi := &file_worker_proto_msgTypes[29]
  2271. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2272. ms.StoreMessageInfo(mi)
  2273. }
  2274. func (x *BalanceTaskConfig) String() string {
  2275. return protoimpl.X.MessageStringOf(x)
  2276. }
  2277. func (*BalanceTaskConfig) ProtoMessage() {}
  2278. func (x *BalanceTaskConfig) ProtoReflect() protoreflect.Message {
  2279. mi := &file_worker_proto_msgTypes[29]
  2280. if x != nil {
  2281. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2282. if ms.LoadMessageInfo() == nil {
  2283. ms.StoreMessageInfo(mi)
  2284. }
  2285. return ms
  2286. }
  2287. return mi.MessageOf(x)
  2288. }
  2289. // Deprecated: Use BalanceTaskConfig.ProtoReflect.Descriptor instead.
  2290. func (*BalanceTaskConfig) Descriptor() ([]byte, []int) {
  2291. return file_worker_proto_rawDescGZIP(), []int{29}
  2292. }
  2293. func (x *BalanceTaskConfig) GetImbalanceThreshold() float64 {
  2294. if x != nil {
  2295. return x.ImbalanceThreshold
  2296. }
  2297. return 0
  2298. }
  2299. func (x *BalanceTaskConfig) GetMinServerCount() int32 {
  2300. if x != nil {
  2301. return x.MinServerCount
  2302. }
  2303. return 0
  2304. }
  2305. // ReplicationTaskConfig contains replication-specific configuration
  2306. type ReplicationTaskConfig struct {
  2307. state protoimpl.MessageState `protogen:"open.v1"`
  2308. TargetReplicaCount int32 `protobuf:"varint,1,opt,name=target_replica_count,json=targetReplicaCount,proto3" json:"target_replica_count,omitempty"` // Target number of replicas
  2309. unknownFields protoimpl.UnknownFields
  2310. sizeCache protoimpl.SizeCache
  2311. }
  2312. func (x *ReplicationTaskConfig) Reset() {
  2313. *x = ReplicationTaskConfig{}
  2314. mi := &file_worker_proto_msgTypes[30]
  2315. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2316. ms.StoreMessageInfo(mi)
  2317. }
  2318. func (x *ReplicationTaskConfig) String() string {
  2319. return protoimpl.X.MessageStringOf(x)
  2320. }
  2321. func (*ReplicationTaskConfig) ProtoMessage() {}
  2322. func (x *ReplicationTaskConfig) ProtoReflect() protoreflect.Message {
  2323. mi := &file_worker_proto_msgTypes[30]
  2324. if x != nil {
  2325. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2326. if ms.LoadMessageInfo() == nil {
  2327. ms.StoreMessageInfo(mi)
  2328. }
  2329. return ms
  2330. }
  2331. return mi.MessageOf(x)
  2332. }
  2333. // Deprecated: Use ReplicationTaskConfig.ProtoReflect.Descriptor instead.
  2334. func (*ReplicationTaskConfig) Descriptor() ([]byte, []int) {
  2335. return file_worker_proto_rawDescGZIP(), []int{30}
  2336. }
  2337. func (x *ReplicationTaskConfig) GetTargetReplicaCount() int32 {
  2338. if x != nil {
  2339. return x.TargetReplicaCount
  2340. }
  2341. return 0
  2342. }
  2343. // MaintenanceTaskData represents complete task state for persistence
  2344. type MaintenanceTaskData struct {
  2345. state protoimpl.MessageState `protogen:"open.v1"`
  2346. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  2347. Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
  2348. Priority string `protobuf:"bytes,3,opt,name=priority,proto3" json:"priority,omitempty"`
  2349. Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
  2350. VolumeId uint32 `protobuf:"varint,5,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"`
  2351. Server string `protobuf:"bytes,6,opt,name=server,proto3" json:"server,omitempty"`
  2352. Collection string `protobuf:"bytes,7,opt,name=collection,proto3" json:"collection,omitempty"`
  2353. TypedParams *TaskParams `protobuf:"bytes,8,opt,name=typed_params,json=typedParams,proto3" json:"typed_params,omitempty"`
  2354. Reason string `protobuf:"bytes,9,opt,name=reason,proto3" json:"reason,omitempty"`
  2355. CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
  2356. ScheduledAt int64 `protobuf:"varint,11,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"`
  2357. StartedAt int64 `protobuf:"varint,12,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
  2358. CompletedAt int64 `protobuf:"varint,13,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
  2359. WorkerId string `protobuf:"bytes,14,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  2360. Error string `protobuf:"bytes,15,opt,name=error,proto3" json:"error,omitempty"`
  2361. Progress float64 `protobuf:"fixed64,16,opt,name=progress,proto3" json:"progress,omitempty"`
  2362. RetryCount int32 `protobuf:"varint,17,opt,name=retry_count,json=retryCount,proto3" json:"retry_count,omitempty"`
  2363. MaxRetries int32 `protobuf:"varint,18,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
  2364. // Enhanced fields for detailed task tracking
  2365. CreatedBy string `protobuf:"bytes,19,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
  2366. CreationContext string `protobuf:"bytes,20,opt,name=creation_context,json=creationContext,proto3" json:"creation_context,omitempty"`
  2367. AssignmentHistory []*TaskAssignmentRecord `protobuf:"bytes,21,rep,name=assignment_history,json=assignmentHistory,proto3" json:"assignment_history,omitempty"`
  2368. DetailedReason string `protobuf:"bytes,22,opt,name=detailed_reason,json=detailedReason,proto3" json:"detailed_reason,omitempty"`
  2369. Tags map[string]string `protobuf:"bytes,23,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  2370. CreationMetrics *TaskCreationMetrics `protobuf:"bytes,24,opt,name=creation_metrics,json=creationMetrics,proto3" json:"creation_metrics,omitempty"`
  2371. unknownFields protoimpl.UnknownFields
  2372. sizeCache protoimpl.SizeCache
  2373. }
  2374. func (x *MaintenanceTaskData) Reset() {
  2375. *x = MaintenanceTaskData{}
  2376. mi := &file_worker_proto_msgTypes[31]
  2377. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2378. ms.StoreMessageInfo(mi)
  2379. }
  2380. func (x *MaintenanceTaskData) String() string {
  2381. return protoimpl.X.MessageStringOf(x)
  2382. }
  2383. func (*MaintenanceTaskData) ProtoMessage() {}
  2384. func (x *MaintenanceTaskData) ProtoReflect() protoreflect.Message {
  2385. mi := &file_worker_proto_msgTypes[31]
  2386. if x != nil {
  2387. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2388. if ms.LoadMessageInfo() == nil {
  2389. ms.StoreMessageInfo(mi)
  2390. }
  2391. return ms
  2392. }
  2393. return mi.MessageOf(x)
  2394. }
  2395. // Deprecated: Use MaintenanceTaskData.ProtoReflect.Descriptor instead.
  2396. func (*MaintenanceTaskData) Descriptor() ([]byte, []int) {
  2397. return file_worker_proto_rawDescGZIP(), []int{31}
  2398. }
  2399. func (x *MaintenanceTaskData) GetId() string {
  2400. if x != nil {
  2401. return x.Id
  2402. }
  2403. return ""
  2404. }
  2405. func (x *MaintenanceTaskData) GetType() string {
  2406. if x != nil {
  2407. return x.Type
  2408. }
  2409. return ""
  2410. }
  2411. func (x *MaintenanceTaskData) GetPriority() string {
  2412. if x != nil {
  2413. return x.Priority
  2414. }
  2415. return ""
  2416. }
  2417. func (x *MaintenanceTaskData) GetStatus() string {
  2418. if x != nil {
  2419. return x.Status
  2420. }
  2421. return ""
  2422. }
  2423. func (x *MaintenanceTaskData) GetVolumeId() uint32 {
  2424. if x != nil {
  2425. return x.VolumeId
  2426. }
  2427. return 0
  2428. }
  2429. func (x *MaintenanceTaskData) GetServer() string {
  2430. if x != nil {
  2431. return x.Server
  2432. }
  2433. return ""
  2434. }
  2435. func (x *MaintenanceTaskData) GetCollection() string {
  2436. if x != nil {
  2437. return x.Collection
  2438. }
  2439. return ""
  2440. }
  2441. func (x *MaintenanceTaskData) GetTypedParams() *TaskParams {
  2442. if x != nil {
  2443. return x.TypedParams
  2444. }
  2445. return nil
  2446. }
  2447. func (x *MaintenanceTaskData) GetReason() string {
  2448. if x != nil {
  2449. return x.Reason
  2450. }
  2451. return ""
  2452. }
  2453. func (x *MaintenanceTaskData) GetCreatedAt() int64 {
  2454. if x != nil {
  2455. return x.CreatedAt
  2456. }
  2457. return 0
  2458. }
  2459. func (x *MaintenanceTaskData) GetScheduledAt() int64 {
  2460. if x != nil {
  2461. return x.ScheduledAt
  2462. }
  2463. return 0
  2464. }
  2465. func (x *MaintenanceTaskData) GetStartedAt() int64 {
  2466. if x != nil {
  2467. return x.StartedAt
  2468. }
  2469. return 0
  2470. }
  2471. func (x *MaintenanceTaskData) GetCompletedAt() int64 {
  2472. if x != nil {
  2473. return x.CompletedAt
  2474. }
  2475. return 0
  2476. }
  2477. func (x *MaintenanceTaskData) GetWorkerId() string {
  2478. if x != nil {
  2479. return x.WorkerId
  2480. }
  2481. return ""
  2482. }
  2483. func (x *MaintenanceTaskData) GetError() string {
  2484. if x != nil {
  2485. return x.Error
  2486. }
  2487. return ""
  2488. }
  2489. func (x *MaintenanceTaskData) GetProgress() float64 {
  2490. if x != nil {
  2491. return x.Progress
  2492. }
  2493. return 0
  2494. }
  2495. func (x *MaintenanceTaskData) GetRetryCount() int32 {
  2496. if x != nil {
  2497. return x.RetryCount
  2498. }
  2499. return 0
  2500. }
  2501. func (x *MaintenanceTaskData) GetMaxRetries() int32 {
  2502. if x != nil {
  2503. return x.MaxRetries
  2504. }
  2505. return 0
  2506. }
  2507. func (x *MaintenanceTaskData) GetCreatedBy() string {
  2508. if x != nil {
  2509. return x.CreatedBy
  2510. }
  2511. return ""
  2512. }
  2513. func (x *MaintenanceTaskData) GetCreationContext() string {
  2514. if x != nil {
  2515. return x.CreationContext
  2516. }
  2517. return ""
  2518. }
  2519. func (x *MaintenanceTaskData) GetAssignmentHistory() []*TaskAssignmentRecord {
  2520. if x != nil {
  2521. return x.AssignmentHistory
  2522. }
  2523. return nil
  2524. }
  2525. func (x *MaintenanceTaskData) GetDetailedReason() string {
  2526. if x != nil {
  2527. return x.DetailedReason
  2528. }
  2529. return ""
  2530. }
  2531. func (x *MaintenanceTaskData) GetTags() map[string]string {
  2532. if x != nil {
  2533. return x.Tags
  2534. }
  2535. return nil
  2536. }
  2537. func (x *MaintenanceTaskData) GetCreationMetrics() *TaskCreationMetrics {
  2538. if x != nil {
  2539. return x.CreationMetrics
  2540. }
  2541. return nil
  2542. }
  2543. // TaskAssignmentRecord tracks worker assignments for a task
  2544. type TaskAssignmentRecord struct {
  2545. state protoimpl.MessageState `protogen:"open.v1"`
  2546. WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
  2547. WorkerAddress string `protobuf:"bytes,2,opt,name=worker_address,json=workerAddress,proto3" json:"worker_address,omitempty"`
  2548. AssignedAt int64 `protobuf:"varint,3,opt,name=assigned_at,json=assignedAt,proto3" json:"assigned_at,omitempty"`
  2549. UnassignedAt int64 `protobuf:"varint,4,opt,name=unassigned_at,json=unassignedAt,proto3" json:"unassigned_at,omitempty"` // Optional: when worker was unassigned
  2550. Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` // Reason for assignment/unassignment
  2551. unknownFields protoimpl.UnknownFields
  2552. sizeCache protoimpl.SizeCache
  2553. }
  2554. func (x *TaskAssignmentRecord) Reset() {
  2555. *x = TaskAssignmentRecord{}
  2556. mi := &file_worker_proto_msgTypes[32]
  2557. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2558. ms.StoreMessageInfo(mi)
  2559. }
  2560. func (x *TaskAssignmentRecord) String() string {
  2561. return protoimpl.X.MessageStringOf(x)
  2562. }
  2563. func (*TaskAssignmentRecord) ProtoMessage() {}
  2564. func (x *TaskAssignmentRecord) ProtoReflect() protoreflect.Message {
  2565. mi := &file_worker_proto_msgTypes[32]
  2566. if x != nil {
  2567. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2568. if ms.LoadMessageInfo() == nil {
  2569. ms.StoreMessageInfo(mi)
  2570. }
  2571. return ms
  2572. }
  2573. return mi.MessageOf(x)
  2574. }
  2575. // Deprecated: Use TaskAssignmentRecord.ProtoReflect.Descriptor instead.
  2576. func (*TaskAssignmentRecord) Descriptor() ([]byte, []int) {
  2577. return file_worker_proto_rawDescGZIP(), []int{32}
  2578. }
  2579. func (x *TaskAssignmentRecord) GetWorkerId() string {
  2580. if x != nil {
  2581. return x.WorkerId
  2582. }
  2583. return ""
  2584. }
  2585. func (x *TaskAssignmentRecord) GetWorkerAddress() string {
  2586. if x != nil {
  2587. return x.WorkerAddress
  2588. }
  2589. return ""
  2590. }
  2591. func (x *TaskAssignmentRecord) GetAssignedAt() int64 {
  2592. if x != nil {
  2593. return x.AssignedAt
  2594. }
  2595. return 0
  2596. }
  2597. func (x *TaskAssignmentRecord) GetUnassignedAt() int64 {
  2598. if x != nil {
  2599. return x.UnassignedAt
  2600. }
  2601. return 0
  2602. }
  2603. func (x *TaskAssignmentRecord) GetReason() string {
  2604. if x != nil {
  2605. return x.Reason
  2606. }
  2607. return ""
  2608. }
  2609. // TaskCreationMetrics tracks why and how a task was created
  2610. type TaskCreationMetrics struct {
  2611. state protoimpl.MessageState `protogen:"open.v1"`
  2612. TriggerMetric string `protobuf:"bytes,1,opt,name=trigger_metric,json=triggerMetric,proto3" json:"trigger_metric,omitempty"` // Name of metric that triggered creation
  2613. MetricValue float64 `protobuf:"fixed64,2,opt,name=metric_value,json=metricValue,proto3" json:"metric_value,omitempty"` // Value that triggered creation
  2614. Threshold float64 `protobuf:"fixed64,3,opt,name=threshold,proto3" json:"threshold,omitempty"` // Threshold that was exceeded
  2615. VolumeMetrics *VolumeHealthMetrics `protobuf:"bytes,4,opt,name=volume_metrics,json=volumeMetrics,proto3" json:"volume_metrics,omitempty"` // Volume health at creation time
  2616. AdditionalData map[string]string `protobuf:"bytes,5,rep,name=additional_data,json=additionalData,proto3" json:"additional_data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Additional context data
  2617. unknownFields protoimpl.UnknownFields
  2618. sizeCache protoimpl.SizeCache
  2619. }
  2620. func (x *TaskCreationMetrics) Reset() {
  2621. *x = TaskCreationMetrics{}
  2622. mi := &file_worker_proto_msgTypes[33]
  2623. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2624. ms.StoreMessageInfo(mi)
  2625. }
  2626. func (x *TaskCreationMetrics) String() string {
  2627. return protoimpl.X.MessageStringOf(x)
  2628. }
  2629. func (*TaskCreationMetrics) ProtoMessage() {}
  2630. func (x *TaskCreationMetrics) ProtoReflect() protoreflect.Message {
  2631. mi := &file_worker_proto_msgTypes[33]
  2632. if x != nil {
  2633. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2634. if ms.LoadMessageInfo() == nil {
  2635. ms.StoreMessageInfo(mi)
  2636. }
  2637. return ms
  2638. }
  2639. return mi.MessageOf(x)
  2640. }
  2641. // Deprecated: Use TaskCreationMetrics.ProtoReflect.Descriptor instead.
  2642. func (*TaskCreationMetrics) Descriptor() ([]byte, []int) {
  2643. return file_worker_proto_rawDescGZIP(), []int{33}
  2644. }
  2645. func (x *TaskCreationMetrics) GetTriggerMetric() string {
  2646. if x != nil {
  2647. return x.TriggerMetric
  2648. }
  2649. return ""
  2650. }
  2651. func (x *TaskCreationMetrics) GetMetricValue() float64 {
  2652. if x != nil {
  2653. return x.MetricValue
  2654. }
  2655. return 0
  2656. }
  2657. func (x *TaskCreationMetrics) GetThreshold() float64 {
  2658. if x != nil {
  2659. return x.Threshold
  2660. }
  2661. return 0
  2662. }
  2663. func (x *TaskCreationMetrics) GetVolumeMetrics() *VolumeHealthMetrics {
  2664. if x != nil {
  2665. return x.VolumeMetrics
  2666. }
  2667. return nil
  2668. }
  2669. func (x *TaskCreationMetrics) GetAdditionalData() map[string]string {
  2670. if x != nil {
  2671. return x.AdditionalData
  2672. }
  2673. return nil
  2674. }
  2675. // VolumeHealthMetrics captures volume state at task creation
  2676. type VolumeHealthMetrics struct {
  2677. state protoimpl.MessageState `protogen:"open.v1"`
  2678. TotalSize uint64 `protobuf:"varint,1,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
  2679. UsedSize uint64 `protobuf:"varint,2,opt,name=used_size,json=usedSize,proto3" json:"used_size,omitempty"`
  2680. GarbageSize uint64 `protobuf:"varint,3,opt,name=garbage_size,json=garbageSize,proto3" json:"garbage_size,omitempty"`
  2681. GarbageRatio float64 `protobuf:"fixed64,4,opt,name=garbage_ratio,json=garbageRatio,proto3" json:"garbage_ratio,omitempty"`
  2682. FileCount int32 `protobuf:"varint,5,opt,name=file_count,json=fileCount,proto3" json:"file_count,omitempty"`
  2683. DeletedFileCount int32 `protobuf:"varint,6,opt,name=deleted_file_count,json=deletedFileCount,proto3" json:"deleted_file_count,omitempty"`
  2684. LastModified int64 `protobuf:"varint,7,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"`
  2685. ReplicaCount int32 `protobuf:"varint,8,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"`
  2686. IsEcVolume bool `protobuf:"varint,9,opt,name=is_ec_volume,json=isEcVolume,proto3" json:"is_ec_volume,omitempty"`
  2687. Collection string `protobuf:"bytes,10,opt,name=collection,proto3" json:"collection,omitempty"`
  2688. unknownFields protoimpl.UnknownFields
  2689. sizeCache protoimpl.SizeCache
  2690. }
  2691. func (x *VolumeHealthMetrics) Reset() {
  2692. *x = VolumeHealthMetrics{}
  2693. mi := &file_worker_proto_msgTypes[34]
  2694. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2695. ms.StoreMessageInfo(mi)
  2696. }
  2697. func (x *VolumeHealthMetrics) String() string {
  2698. return protoimpl.X.MessageStringOf(x)
  2699. }
  2700. func (*VolumeHealthMetrics) ProtoMessage() {}
  2701. func (x *VolumeHealthMetrics) ProtoReflect() protoreflect.Message {
  2702. mi := &file_worker_proto_msgTypes[34]
  2703. if x != nil {
  2704. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2705. if ms.LoadMessageInfo() == nil {
  2706. ms.StoreMessageInfo(mi)
  2707. }
  2708. return ms
  2709. }
  2710. return mi.MessageOf(x)
  2711. }
  2712. // Deprecated: Use VolumeHealthMetrics.ProtoReflect.Descriptor instead.
  2713. func (*VolumeHealthMetrics) Descriptor() ([]byte, []int) {
  2714. return file_worker_proto_rawDescGZIP(), []int{34}
  2715. }
  2716. func (x *VolumeHealthMetrics) GetTotalSize() uint64 {
  2717. if x != nil {
  2718. return x.TotalSize
  2719. }
  2720. return 0
  2721. }
  2722. func (x *VolumeHealthMetrics) GetUsedSize() uint64 {
  2723. if x != nil {
  2724. return x.UsedSize
  2725. }
  2726. return 0
  2727. }
  2728. func (x *VolumeHealthMetrics) GetGarbageSize() uint64 {
  2729. if x != nil {
  2730. return x.GarbageSize
  2731. }
  2732. return 0
  2733. }
  2734. func (x *VolumeHealthMetrics) GetGarbageRatio() float64 {
  2735. if x != nil {
  2736. return x.GarbageRatio
  2737. }
  2738. return 0
  2739. }
  2740. func (x *VolumeHealthMetrics) GetFileCount() int32 {
  2741. if x != nil {
  2742. return x.FileCount
  2743. }
  2744. return 0
  2745. }
  2746. func (x *VolumeHealthMetrics) GetDeletedFileCount() int32 {
  2747. if x != nil {
  2748. return x.DeletedFileCount
  2749. }
  2750. return 0
  2751. }
  2752. func (x *VolumeHealthMetrics) GetLastModified() int64 {
  2753. if x != nil {
  2754. return x.LastModified
  2755. }
  2756. return 0
  2757. }
  2758. func (x *VolumeHealthMetrics) GetReplicaCount() int32 {
  2759. if x != nil {
  2760. return x.ReplicaCount
  2761. }
  2762. return 0
  2763. }
  2764. func (x *VolumeHealthMetrics) GetIsEcVolume() bool {
  2765. if x != nil {
  2766. return x.IsEcVolume
  2767. }
  2768. return false
  2769. }
  2770. func (x *VolumeHealthMetrics) GetCollection() string {
  2771. if x != nil {
  2772. return x.Collection
  2773. }
  2774. return ""
  2775. }
  2776. // TaskStateFile wraps task data with metadata for persistence
  2777. type TaskStateFile struct {
  2778. state protoimpl.MessageState `protogen:"open.v1"`
  2779. Task *MaintenanceTaskData `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"`
  2780. LastUpdated int64 `protobuf:"varint,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
  2781. AdminVersion string `protobuf:"bytes,3,opt,name=admin_version,json=adminVersion,proto3" json:"admin_version,omitempty"`
  2782. unknownFields protoimpl.UnknownFields
  2783. sizeCache protoimpl.SizeCache
  2784. }
  2785. func (x *TaskStateFile) Reset() {
  2786. *x = TaskStateFile{}
  2787. mi := &file_worker_proto_msgTypes[35]
  2788. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2789. ms.StoreMessageInfo(mi)
  2790. }
  2791. func (x *TaskStateFile) String() string {
  2792. return protoimpl.X.MessageStringOf(x)
  2793. }
  2794. func (*TaskStateFile) ProtoMessage() {}
  2795. func (x *TaskStateFile) ProtoReflect() protoreflect.Message {
  2796. mi := &file_worker_proto_msgTypes[35]
  2797. if x != nil {
  2798. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  2799. if ms.LoadMessageInfo() == nil {
  2800. ms.StoreMessageInfo(mi)
  2801. }
  2802. return ms
  2803. }
  2804. return mi.MessageOf(x)
  2805. }
  2806. // Deprecated: Use TaskStateFile.ProtoReflect.Descriptor instead.
  2807. func (*TaskStateFile) Descriptor() ([]byte, []int) {
  2808. return file_worker_proto_rawDescGZIP(), []int{35}
  2809. }
  2810. func (x *TaskStateFile) GetTask() *MaintenanceTaskData {
  2811. if x != nil {
  2812. return x.Task
  2813. }
  2814. return nil
  2815. }
  2816. func (x *TaskStateFile) GetLastUpdated() int64 {
  2817. if x != nil {
  2818. return x.LastUpdated
  2819. }
  2820. return 0
  2821. }
  2822. func (x *TaskStateFile) GetAdminVersion() string {
  2823. if x != nil {
  2824. return x.AdminVersion
  2825. }
  2826. return ""
  2827. }
  2828. var File_worker_proto protoreflect.FileDescriptor
  2829. const file_worker_proto_rawDesc = "" +
  2830. "\n" +
  2831. "\fworker.proto\x12\tworker_pb\"\x90\x04\n" +
  2832. "\rWorkerMessage\x12\x1b\n" +
  2833. "\tworker_id\x18\x01 \x01(\tR\bworkerId\x12\x1c\n" +
  2834. "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\x12C\n" +
  2835. "\fregistration\x18\x03 \x01(\v2\x1d.worker_pb.WorkerRegistrationH\x00R\fregistration\x12:\n" +
  2836. "\theartbeat\x18\x04 \x01(\v2\x1a.worker_pb.WorkerHeartbeatH\x00R\theartbeat\x12;\n" +
  2837. "\ftask_request\x18\x05 \x01(\v2\x16.worker_pb.TaskRequestH\x00R\vtaskRequest\x128\n" +
  2838. "\vtask_update\x18\x06 \x01(\v2\x15.worker_pb.TaskUpdateH\x00R\n" +
  2839. "taskUpdate\x12>\n" +
  2840. "\rtask_complete\x18\a \x01(\v2\x17.worker_pb.TaskCompleteH\x00R\ftaskComplete\x127\n" +
  2841. "\bshutdown\x18\b \x01(\v2\x19.worker_pb.WorkerShutdownH\x00R\bshutdown\x12H\n" +
  2842. "\x11task_log_response\x18\t \x01(\v2\x1a.worker_pb.TaskLogResponseH\x00R\x0ftaskLogResponseB\t\n" +
  2843. "\amessage\"\x95\x04\n" +
  2844. "\fAdminMessage\x12\x19\n" +
  2845. "\badmin_id\x18\x01 \x01(\tR\aadminId\x12\x1c\n" +
  2846. "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\x12V\n" +
  2847. "\x15registration_response\x18\x03 \x01(\v2\x1f.worker_pb.RegistrationResponseH\x00R\x14registrationResponse\x12M\n" +
  2848. "\x12heartbeat_response\x18\x04 \x01(\v2\x1c.worker_pb.HeartbeatResponseH\x00R\x11heartbeatResponse\x12D\n" +
  2849. "\x0ftask_assignment\x18\x05 \x01(\v2\x19.worker_pb.TaskAssignmentH\x00R\x0etaskAssignment\x12J\n" +
  2850. "\x11task_cancellation\x18\x06 \x01(\v2\x1b.worker_pb.TaskCancellationH\x00R\x10taskCancellation\x12A\n" +
  2851. "\x0eadmin_shutdown\x18\a \x01(\v2\x18.worker_pb.AdminShutdownH\x00R\radminShutdown\x12E\n" +
  2852. "\x10task_log_request\x18\b \x01(\v2\x19.worker_pb.TaskLogRequestH\x00R\x0etaskLogRequestB\t\n" +
  2853. "\amessage\"\x9c\x02\n" +
  2854. "\x12WorkerRegistration\x12\x1b\n" +
  2855. "\tworker_id\x18\x01 \x01(\tR\bworkerId\x12\x18\n" +
  2856. "\aaddress\x18\x02 \x01(\tR\aaddress\x12\"\n" +
  2857. "\fcapabilities\x18\x03 \x03(\tR\fcapabilities\x12%\n" +
  2858. "\x0emax_concurrent\x18\x04 \x01(\x05R\rmaxConcurrent\x12G\n" +
  2859. "\bmetadata\x18\x05 \x03(\v2+.worker_pb.WorkerRegistration.MetadataEntryR\bmetadata\x1a;\n" +
  2860. "\rMetadataEntry\x12\x10\n" +
  2861. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  2862. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"x\n" +
  2863. "\x14RegistrationResponse\x12\x18\n" +
  2864. "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
  2865. "\amessage\x18\x02 \x01(\tR\amessage\x12,\n" +
  2866. "\x12assigned_worker_id\x18\x03 \x01(\tR\x10assignedWorkerId\"\xad\x02\n" +
  2867. "\x0fWorkerHeartbeat\x12\x1b\n" +
  2868. "\tworker_id\x18\x01 \x01(\tR\bworkerId\x12\x16\n" +
  2869. "\x06status\x18\x02 \x01(\tR\x06status\x12!\n" +
  2870. "\fcurrent_load\x18\x03 \x01(\x05R\vcurrentLoad\x12%\n" +
  2871. "\x0emax_concurrent\x18\x04 \x01(\x05R\rmaxConcurrent\x12(\n" +
  2872. "\x10current_task_ids\x18\x05 \x03(\tR\x0ecurrentTaskIds\x12'\n" +
  2873. "\x0ftasks_completed\x18\x06 \x01(\x05R\x0etasksCompleted\x12!\n" +
  2874. "\ftasks_failed\x18\a \x01(\x05R\vtasksFailed\x12%\n" +
  2875. "\x0euptime_seconds\x18\b \x01(\x03R\ruptimeSeconds\"G\n" +
  2876. "\x11HeartbeatResponse\x12\x18\n" +
  2877. "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
  2878. "\amessage\x18\x02 \x01(\tR\amessage\"w\n" +
  2879. "\vTaskRequest\x12\x1b\n" +
  2880. "\tworker_id\x18\x01 \x01(\tR\bworkerId\x12\"\n" +
  2881. "\fcapabilities\x18\x02 \x03(\tR\fcapabilities\x12'\n" +
  2882. "\x0favailable_slots\x18\x03 \x01(\x05R\x0eavailableSlots\"\xb6\x02\n" +
  2883. "\x0eTaskAssignment\x12\x17\n" +
  2884. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  2885. "\ttask_type\x18\x02 \x01(\tR\btaskType\x12-\n" +
  2886. "\x06params\x18\x03 \x01(\v2\x15.worker_pb.TaskParamsR\x06params\x12\x1a\n" +
  2887. "\bpriority\x18\x04 \x01(\x05R\bpriority\x12!\n" +
  2888. "\fcreated_time\x18\x05 \x01(\x03R\vcreatedTime\x12C\n" +
  2889. "\bmetadata\x18\x06 \x03(\v2'.worker_pb.TaskAssignment.MetadataEntryR\bmetadata\x1a;\n" +
  2890. "\rMetadataEntry\x12\x10\n" +
  2891. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  2892. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xe1\x04\n" +
  2893. "\n" +
  2894. "TaskParams\x12\x17\n" +
  2895. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  2896. "\tvolume_id\x18\x02 \x01(\rR\bvolumeId\x12\x1e\n" +
  2897. "\n" +
  2898. "collection\x18\x03 \x01(\tR\n" +
  2899. "collection\x12\x1f\n" +
  2900. "\vdata_center\x18\x04 \x01(\tR\n" +
  2901. "dataCenter\x12\x12\n" +
  2902. "\x04rack\x18\x05 \x01(\tR\x04rack\x12\x1f\n" +
  2903. "\vvolume_size\x18\x06 \x01(\x04R\n" +
  2904. "volumeSize\x12/\n" +
  2905. "\asources\x18\a \x03(\v2\x15.worker_pb.TaskSourceR\asources\x12/\n" +
  2906. "\atargets\x18\b \x03(\v2\x15.worker_pb.TaskTargetR\atargets\x12B\n" +
  2907. "\rvacuum_params\x18\t \x01(\v2\x1b.worker_pb.VacuumTaskParamsH\x00R\fvacuumParams\x12X\n" +
  2908. "\x15erasure_coding_params\x18\n" +
  2909. " \x01(\v2\".worker_pb.ErasureCodingTaskParamsH\x00R\x13erasureCodingParams\x12E\n" +
  2910. "\x0ebalance_params\x18\v \x01(\v2\x1c.worker_pb.BalanceTaskParamsH\x00R\rbalanceParams\x12Q\n" +
  2911. "\x12replication_params\x18\f \x01(\v2 .worker_pb.ReplicationTaskParamsH\x00R\x11replicationParamsB\r\n" +
  2912. "\vtask_params\"\xcb\x01\n" +
  2913. "\x10VacuumTaskParams\x12+\n" +
  2914. "\x11garbage_threshold\x18\x01 \x01(\x01R\x10garbageThreshold\x12!\n" +
  2915. "\fforce_vacuum\x18\x02 \x01(\bR\vforceVacuum\x12\x1d\n" +
  2916. "\n" +
  2917. "batch_size\x18\x03 \x01(\x05R\tbatchSize\x12\x1f\n" +
  2918. "\vworking_dir\x18\x04 \x01(\tR\n" +
  2919. "workingDir\x12'\n" +
  2920. "\x0fverify_checksum\x18\x05 \x01(\bR\x0everifyChecksum\"\xfe\x01\n" +
  2921. "\x17ErasureCodingTaskParams\x120\n" +
  2922. "\x14estimated_shard_size\x18\x01 \x01(\x04R\x12estimatedShardSize\x12\x1f\n" +
  2923. "\vdata_shards\x18\x02 \x01(\x05R\n" +
  2924. "dataShards\x12#\n" +
  2925. "\rparity_shards\x18\x03 \x01(\x05R\fparityShards\x12\x1f\n" +
  2926. "\vworking_dir\x18\x04 \x01(\tR\n" +
  2927. "workingDir\x12#\n" +
  2928. "\rmaster_client\x18\x05 \x01(\tR\fmasterClient\x12%\n" +
  2929. "\x0ecleanup_source\x18\x06 \x01(\bR\rcleanupSource\"\xcf\x01\n" +
  2930. "\n" +
  2931. "TaskSource\x12\x12\n" +
  2932. "\x04node\x18\x01 \x01(\tR\x04node\x12\x17\n" +
  2933. "\adisk_id\x18\x02 \x01(\rR\x06diskId\x12\x12\n" +
  2934. "\x04rack\x18\x03 \x01(\tR\x04rack\x12\x1f\n" +
  2935. "\vdata_center\x18\x04 \x01(\tR\n" +
  2936. "dataCenter\x12\x1b\n" +
  2937. "\tvolume_id\x18\x05 \x01(\rR\bvolumeId\x12\x1b\n" +
  2938. "\tshard_ids\x18\x06 \x03(\rR\bshardIds\x12%\n" +
  2939. "\x0eestimated_size\x18\a \x01(\x04R\restimatedSize\"\xcf\x01\n" +
  2940. "\n" +
  2941. "TaskTarget\x12\x12\n" +
  2942. "\x04node\x18\x01 \x01(\tR\x04node\x12\x17\n" +
  2943. "\adisk_id\x18\x02 \x01(\rR\x06diskId\x12\x12\n" +
  2944. "\x04rack\x18\x03 \x01(\tR\x04rack\x12\x1f\n" +
  2945. "\vdata_center\x18\x04 \x01(\tR\n" +
  2946. "dataCenter\x12\x1b\n" +
  2947. "\tvolume_id\x18\x05 \x01(\rR\bvolumeId\x12\x1b\n" +
  2948. "\tshard_ids\x18\x06 \x03(\rR\bshardIds\x12%\n" +
  2949. "\x0eestimated_size\x18\a \x01(\x04R\restimatedSize\"[\n" +
  2950. "\x11BalanceTaskParams\x12\x1d\n" +
  2951. "\n" +
  2952. "force_move\x18\x01 \x01(\bR\tforceMove\x12'\n" +
  2953. "\x0ftimeout_seconds\x18\x02 \x01(\x05R\x0etimeoutSeconds\"k\n" +
  2954. "\x15ReplicationTaskParams\x12#\n" +
  2955. "\rreplica_count\x18\x01 \x01(\x05R\freplicaCount\x12-\n" +
  2956. "\x12verify_consistency\x18\x02 \x01(\bR\x11verifyConsistency\"\x8e\x02\n" +
  2957. "\n" +
  2958. "TaskUpdate\x12\x17\n" +
  2959. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  2960. "\tworker_id\x18\x02 \x01(\tR\bworkerId\x12\x16\n" +
  2961. "\x06status\x18\x03 \x01(\tR\x06status\x12\x1a\n" +
  2962. "\bprogress\x18\x04 \x01(\x02R\bprogress\x12\x18\n" +
  2963. "\amessage\x18\x05 \x01(\tR\amessage\x12?\n" +
  2964. "\bmetadata\x18\x06 \x03(\v2#.worker_pb.TaskUpdate.MetadataEntryR\bmetadata\x1a;\n" +
  2965. "\rMetadataEntry\x12\x10\n" +
  2966. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  2967. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xc5\x02\n" +
  2968. "\fTaskComplete\x12\x17\n" +
  2969. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  2970. "\tworker_id\x18\x02 \x01(\tR\bworkerId\x12\x18\n" +
  2971. "\asuccess\x18\x03 \x01(\bR\asuccess\x12#\n" +
  2972. "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\x12'\n" +
  2973. "\x0fcompletion_time\x18\x05 \x01(\x03R\x0ecompletionTime\x12T\n" +
  2974. "\x0fresult_metadata\x18\x06 \x03(\v2+.worker_pb.TaskComplete.ResultMetadataEntryR\x0eresultMetadata\x1aA\n" +
  2975. "\x13ResultMetadataEntry\x12\x10\n" +
  2976. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  2977. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"Y\n" +
  2978. "\x10TaskCancellation\x12\x17\n" +
  2979. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x16\n" +
  2980. "\x06reason\x18\x02 \x01(\tR\x06reason\x12\x14\n" +
  2981. "\x05force\x18\x03 \x01(\bR\x05force\"o\n" +
  2982. "\x0eWorkerShutdown\x12\x1b\n" +
  2983. "\tworker_id\x18\x01 \x01(\tR\bworkerId\x12\x16\n" +
  2984. "\x06reason\x18\x02 \x01(\tR\x06reason\x12(\n" +
  2985. "\x10pending_task_ids\x18\x03 \x03(\tR\x0ependingTaskIds\"c\n" +
  2986. "\rAdminShutdown\x12\x16\n" +
  2987. "\x06reason\x18\x01 \x01(\tR\x06reason\x12:\n" +
  2988. "\x19graceful_shutdown_seconds\x18\x02 \x01(\x05R\x17gracefulShutdownSeconds\"\xe9\x01\n" +
  2989. "\x0eTaskLogRequest\x12\x17\n" +
  2990. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  2991. "\tworker_id\x18\x02 \x01(\tR\bworkerId\x12)\n" +
  2992. "\x10include_metadata\x18\x03 \x01(\bR\x0fincludeMetadata\x12\x1f\n" +
  2993. "\vmax_entries\x18\x04 \x01(\x05R\n" +
  2994. "maxEntries\x12\x1b\n" +
  2995. "\tlog_level\x18\x05 \x01(\tR\blogLevel\x12\x1d\n" +
  2996. "\n" +
  2997. "start_time\x18\x06 \x01(\x03R\tstartTime\x12\x19\n" +
  2998. "\bend_time\x18\a \x01(\x03R\aendTime\"\xf8\x01\n" +
  2999. "\x0fTaskLogResponse\x12\x17\n" +
  3000. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  3001. "\tworker_id\x18\x02 \x01(\tR\bworkerId\x12\x18\n" +
  3002. "\asuccess\x18\x03 \x01(\bR\asuccess\x12#\n" +
  3003. "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\x126\n" +
  3004. "\bmetadata\x18\x05 \x01(\v2\x1a.worker_pb.TaskLogMetadataR\bmetadata\x128\n" +
  3005. "\vlog_entries\x18\x06 \x03(\v2\x17.worker_pb.TaskLogEntryR\n" +
  3006. "logEntries\"\x97\x04\n" +
  3007. "\x0fTaskLogMetadata\x12\x17\n" +
  3008. "\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
  3009. "\ttask_type\x18\x02 \x01(\tR\btaskType\x12\x1b\n" +
  3010. "\tworker_id\x18\x03 \x01(\tR\bworkerId\x12\x1d\n" +
  3011. "\n" +
  3012. "start_time\x18\x04 \x01(\x03R\tstartTime\x12\x19\n" +
  3013. "\bend_time\x18\x05 \x01(\x03R\aendTime\x12\x1f\n" +
  3014. "\vduration_ms\x18\x06 \x01(\x03R\n" +
  3015. "durationMs\x12\x16\n" +
  3016. "\x06status\x18\a \x01(\tR\x06status\x12\x1a\n" +
  3017. "\bprogress\x18\b \x01(\x02R\bprogress\x12\x1b\n" +
  3018. "\tvolume_id\x18\t \x01(\rR\bvolumeId\x12\x16\n" +
  3019. "\x06server\x18\n" +
  3020. " \x01(\tR\x06server\x12\x1e\n" +
  3021. "\n" +
  3022. "collection\x18\v \x01(\tR\n" +
  3023. "collection\x12\"\n" +
  3024. "\rlog_file_path\x18\f \x01(\tR\vlogFilePath\x12\x1d\n" +
  3025. "\n" +
  3026. "created_at\x18\r \x01(\x03R\tcreatedAt\x12K\n" +
  3027. "\vcustom_data\x18\x0e \x03(\v2*.worker_pb.TaskLogMetadata.CustomDataEntryR\n" +
  3028. "customData\x1a=\n" +
  3029. "\x0fCustomDataEntry\x12\x10\n" +
  3030. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  3031. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x88\x02\n" +
  3032. "\fTaskLogEntry\x12\x1c\n" +
  3033. "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12\x14\n" +
  3034. "\x05level\x18\x02 \x01(\tR\x05level\x12\x18\n" +
  3035. "\amessage\x18\x03 \x01(\tR\amessage\x12;\n" +
  3036. "\x06fields\x18\x04 \x03(\v2#.worker_pb.TaskLogEntry.FieldsEntryR\x06fields\x12\x1a\n" +
  3037. "\bprogress\x18\x05 \x01(\x02R\bprogress\x12\x16\n" +
  3038. "\x06status\x18\x06 \x01(\tR\x06status\x1a9\n" +
  3039. "\vFieldsEntry\x12\x10\n" +
  3040. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  3041. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xc0\x03\n" +
  3042. "\x11MaintenanceConfig\x12\x18\n" +
  3043. "\aenabled\x18\x01 \x01(\bR\aenabled\x122\n" +
  3044. "\x15scan_interval_seconds\x18\x02 \x01(\x05R\x13scanIntervalSeconds\x124\n" +
  3045. "\x16worker_timeout_seconds\x18\x03 \x01(\x05R\x14workerTimeoutSeconds\x120\n" +
  3046. "\x14task_timeout_seconds\x18\x04 \x01(\x05R\x12taskTimeoutSeconds\x12.\n" +
  3047. "\x13retry_delay_seconds\x18\x05 \x01(\x05R\x11retryDelaySeconds\x12\x1f\n" +
  3048. "\vmax_retries\x18\x06 \x01(\x05R\n" +
  3049. "maxRetries\x128\n" +
  3050. "\x18cleanup_interval_seconds\x18\a \x01(\x05R\x16cleanupIntervalSeconds\x124\n" +
  3051. "\x16task_retention_seconds\x18\b \x01(\x05R\x14taskRetentionSeconds\x124\n" +
  3052. "\x06policy\x18\t \x01(\v2\x1c.worker_pb.MaintenancePolicyR\x06policy\"\x80\x03\n" +
  3053. "\x11MaintenancePolicy\x12S\n" +
  3054. "\rtask_policies\x18\x01 \x03(\v2..worker_pb.MaintenancePolicy.TaskPoliciesEntryR\ftaskPolicies\x122\n" +
  3055. "\x15global_max_concurrent\x18\x02 \x01(\x05R\x13globalMaxConcurrent\x12E\n" +
  3056. "\x1fdefault_repeat_interval_seconds\x18\x03 \x01(\x05R\x1cdefaultRepeatIntervalSeconds\x12C\n" +
  3057. "\x1edefault_check_interval_seconds\x18\x04 \x01(\x05R\x1bdefaultCheckIntervalSeconds\x1aV\n" +
  3058. "\x11TaskPoliciesEntry\x12\x10\n" +
  3059. "\x03key\x18\x01 \x01(\tR\x03key\x12+\n" +
  3060. "\x05value\x18\x02 \x01(\v2\x15.worker_pb.TaskPolicyR\x05value:\x028\x01\"\x82\x04\n" +
  3061. "\n" +
  3062. "TaskPolicy\x12\x18\n" +
  3063. "\aenabled\x18\x01 \x01(\bR\aenabled\x12%\n" +
  3064. "\x0emax_concurrent\x18\x02 \x01(\x05R\rmaxConcurrent\x126\n" +
  3065. "\x17repeat_interval_seconds\x18\x03 \x01(\x05R\x15repeatIntervalSeconds\x124\n" +
  3066. "\x16check_interval_seconds\x18\x04 \x01(\x05R\x14checkIntervalSeconds\x12B\n" +
  3067. "\rvacuum_config\x18\x05 \x01(\v2\x1b.worker_pb.VacuumTaskConfigH\x00R\fvacuumConfig\x12X\n" +
  3068. "\x15erasure_coding_config\x18\x06 \x01(\v2\".worker_pb.ErasureCodingTaskConfigH\x00R\x13erasureCodingConfig\x12E\n" +
  3069. "\x0ebalance_config\x18\a \x01(\v2\x1c.worker_pb.BalanceTaskConfigH\x00R\rbalanceConfig\x12Q\n" +
  3070. "\x12replication_config\x18\b \x01(\v2 .worker_pb.ReplicationTaskConfigH\x00R\x11replicationConfigB\r\n" +
  3071. "\vtask_config\"\xa2\x01\n" +
  3072. "\x10VacuumTaskConfig\x12+\n" +
  3073. "\x11garbage_threshold\x18\x01 \x01(\x01R\x10garbageThreshold\x12/\n" +
  3074. "\x14min_volume_age_hours\x18\x02 \x01(\x05R\x11minVolumeAgeHours\x120\n" +
  3075. "\x14min_interval_seconds\x18\x03 \x01(\x05R\x12minIntervalSeconds\"\xc6\x01\n" +
  3076. "\x17ErasureCodingTaskConfig\x12%\n" +
  3077. "\x0efullness_ratio\x18\x01 \x01(\x01R\rfullnessRatio\x12*\n" +
  3078. "\x11quiet_for_seconds\x18\x02 \x01(\x05R\x0fquietForSeconds\x12+\n" +
  3079. "\x12min_volume_size_mb\x18\x03 \x01(\x05R\x0fminVolumeSizeMb\x12+\n" +
  3080. "\x11collection_filter\x18\x04 \x01(\tR\x10collectionFilter\"n\n" +
  3081. "\x11BalanceTaskConfig\x12/\n" +
  3082. "\x13imbalance_threshold\x18\x01 \x01(\x01R\x12imbalanceThreshold\x12(\n" +
  3083. "\x10min_server_count\x18\x02 \x01(\x05R\x0eminServerCount\"I\n" +
  3084. "\x15ReplicationTaskConfig\x120\n" +
  3085. "\x14target_replica_count\x18\x01 \x01(\x05R\x12targetReplicaCount\"\xae\a\n" +
  3086. "\x13MaintenanceTaskData\x12\x0e\n" +
  3087. "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
  3088. "\x04type\x18\x02 \x01(\tR\x04type\x12\x1a\n" +
  3089. "\bpriority\x18\x03 \x01(\tR\bpriority\x12\x16\n" +
  3090. "\x06status\x18\x04 \x01(\tR\x06status\x12\x1b\n" +
  3091. "\tvolume_id\x18\x05 \x01(\rR\bvolumeId\x12\x16\n" +
  3092. "\x06server\x18\x06 \x01(\tR\x06server\x12\x1e\n" +
  3093. "\n" +
  3094. "collection\x18\a \x01(\tR\n" +
  3095. "collection\x128\n" +
  3096. "\ftyped_params\x18\b \x01(\v2\x15.worker_pb.TaskParamsR\vtypedParams\x12\x16\n" +
  3097. "\x06reason\x18\t \x01(\tR\x06reason\x12\x1d\n" +
  3098. "\n" +
  3099. "created_at\x18\n" +
  3100. " \x01(\x03R\tcreatedAt\x12!\n" +
  3101. "\fscheduled_at\x18\v \x01(\x03R\vscheduledAt\x12\x1d\n" +
  3102. "\n" +
  3103. "started_at\x18\f \x01(\x03R\tstartedAt\x12!\n" +
  3104. "\fcompleted_at\x18\r \x01(\x03R\vcompletedAt\x12\x1b\n" +
  3105. "\tworker_id\x18\x0e \x01(\tR\bworkerId\x12\x14\n" +
  3106. "\x05error\x18\x0f \x01(\tR\x05error\x12\x1a\n" +
  3107. "\bprogress\x18\x10 \x01(\x01R\bprogress\x12\x1f\n" +
  3108. "\vretry_count\x18\x11 \x01(\x05R\n" +
  3109. "retryCount\x12\x1f\n" +
  3110. "\vmax_retries\x18\x12 \x01(\x05R\n" +
  3111. "maxRetries\x12\x1d\n" +
  3112. "\n" +
  3113. "created_by\x18\x13 \x01(\tR\tcreatedBy\x12)\n" +
  3114. "\x10creation_context\x18\x14 \x01(\tR\x0fcreationContext\x12N\n" +
  3115. "\x12assignment_history\x18\x15 \x03(\v2\x1f.worker_pb.TaskAssignmentRecordR\x11assignmentHistory\x12'\n" +
  3116. "\x0fdetailed_reason\x18\x16 \x01(\tR\x0edetailedReason\x12<\n" +
  3117. "\x04tags\x18\x17 \x03(\v2(.worker_pb.MaintenanceTaskData.TagsEntryR\x04tags\x12I\n" +
  3118. "\x10creation_metrics\x18\x18 \x01(\v2\x1e.worker_pb.TaskCreationMetricsR\x0fcreationMetrics\x1a7\n" +
  3119. "\tTagsEntry\x12\x10\n" +
  3120. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  3121. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb8\x01\n" +
  3122. "\x14TaskAssignmentRecord\x12\x1b\n" +
  3123. "\tworker_id\x18\x01 \x01(\tR\bworkerId\x12%\n" +
  3124. "\x0eworker_address\x18\x02 \x01(\tR\rworkerAddress\x12\x1f\n" +
  3125. "\vassigned_at\x18\x03 \x01(\x03R\n" +
  3126. "assignedAt\x12#\n" +
  3127. "\runassigned_at\x18\x04 \x01(\x03R\funassignedAt\x12\x16\n" +
  3128. "\x06reason\x18\x05 \x01(\tR\x06reason\"\xe4\x02\n" +
  3129. "\x13TaskCreationMetrics\x12%\n" +
  3130. "\x0etrigger_metric\x18\x01 \x01(\tR\rtriggerMetric\x12!\n" +
  3131. "\fmetric_value\x18\x02 \x01(\x01R\vmetricValue\x12\x1c\n" +
  3132. "\tthreshold\x18\x03 \x01(\x01R\tthreshold\x12E\n" +
  3133. "\x0evolume_metrics\x18\x04 \x01(\v2\x1e.worker_pb.VolumeHealthMetricsR\rvolumeMetrics\x12[\n" +
  3134. "\x0fadditional_data\x18\x05 \x03(\v22.worker_pb.TaskCreationMetrics.AdditionalDataEntryR\x0eadditionalData\x1aA\n" +
  3135. "\x13AdditionalDataEntry\x12\x10\n" +
  3136. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  3137. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xf2\x02\n" +
  3138. "\x13VolumeHealthMetrics\x12\x1d\n" +
  3139. "\n" +
  3140. "total_size\x18\x01 \x01(\x04R\ttotalSize\x12\x1b\n" +
  3141. "\tused_size\x18\x02 \x01(\x04R\busedSize\x12!\n" +
  3142. "\fgarbage_size\x18\x03 \x01(\x04R\vgarbageSize\x12#\n" +
  3143. "\rgarbage_ratio\x18\x04 \x01(\x01R\fgarbageRatio\x12\x1d\n" +
  3144. "\n" +
  3145. "file_count\x18\x05 \x01(\x05R\tfileCount\x12,\n" +
  3146. "\x12deleted_file_count\x18\x06 \x01(\x05R\x10deletedFileCount\x12#\n" +
  3147. "\rlast_modified\x18\a \x01(\x03R\flastModified\x12#\n" +
  3148. "\rreplica_count\x18\b \x01(\x05R\freplicaCount\x12 \n" +
  3149. "\fis_ec_volume\x18\t \x01(\bR\n" +
  3150. "isEcVolume\x12\x1e\n" +
  3151. "\n" +
  3152. "collection\x18\n" +
  3153. " \x01(\tR\n" +
  3154. "collection\"\x8b\x01\n" +
  3155. "\rTaskStateFile\x122\n" +
  3156. "\x04task\x18\x01 \x01(\v2\x1e.worker_pb.MaintenanceTaskDataR\x04task\x12!\n" +
  3157. "\flast_updated\x18\x02 \x01(\x03R\vlastUpdated\x12#\n" +
  3158. "\radmin_version\x18\x03 \x01(\tR\fadminVersion2V\n" +
  3159. "\rWorkerService\x12E\n" +
  3160. "\fWorkerStream\x12\x18.worker_pb.WorkerMessage\x1a\x17.worker_pb.AdminMessage(\x010\x01B2Z0github.com/seaweedfs/seaweedfs/weed/pb/worker_pbb\x06proto3"
  3161. var (
  3162. file_worker_proto_rawDescOnce sync.Once
  3163. file_worker_proto_rawDescData []byte
  3164. )
  3165. func file_worker_proto_rawDescGZIP() []byte {
  3166. file_worker_proto_rawDescOnce.Do(func() {
  3167. file_worker_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_worker_proto_rawDesc), len(file_worker_proto_rawDesc)))
  3168. })
  3169. return file_worker_proto_rawDescData
  3170. }
  3171. var file_worker_proto_msgTypes = make([]protoimpl.MessageInfo, 45)
  3172. var file_worker_proto_goTypes = []any{
  3173. (*WorkerMessage)(nil), // 0: worker_pb.WorkerMessage
  3174. (*AdminMessage)(nil), // 1: worker_pb.AdminMessage
  3175. (*WorkerRegistration)(nil), // 2: worker_pb.WorkerRegistration
  3176. (*RegistrationResponse)(nil), // 3: worker_pb.RegistrationResponse
  3177. (*WorkerHeartbeat)(nil), // 4: worker_pb.WorkerHeartbeat
  3178. (*HeartbeatResponse)(nil), // 5: worker_pb.HeartbeatResponse
  3179. (*TaskRequest)(nil), // 6: worker_pb.TaskRequest
  3180. (*TaskAssignment)(nil), // 7: worker_pb.TaskAssignment
  3181. (*TaskParams)(nil), // 8: worker_pb.TaskParams
  3182. (*VacuumTaskParams)(nil), // 9: worker_pb.VacuumTaskParams
  3183. (*ErasureCodingTaskParams)(nil), // 10: worker_pb.ErasureCodingTaskParams
  3184. (*TaskSource)(nil), // 11: worker_pb.TaskSource
  3185. (*TaskTarget)(nil), // 12: worker_pb.TaskTarget
  3186. (*BalanceTaskParams)(nil), // 13: worker_pb.BalanceTaskParams
  3187. (*ReplicationTaskParams)(nil), // 14: worker_pb.ReplicationTaskParams
  3188. (*TaskUpdate)(nil), // 15: worker_pb.TaskUpdate
  3189. (*TaskComplete)(nil), // 16: worker_pb.TaskComplete
  3190. (*TaskCancellation)(nil), // 17: worker_pb.TaskCancellation
  3191. (*WorkerShutdown)(nil), // 18: worker_pb.WorkerShutdown
  3192. (*AdminShutdown)(nil), // 19: worker_pb.AdminShutdown
  3193. (*TaskLogRequest)(nil), // 20: worker_pb.TaskLogRequest
  3194. (*TaskLogResponse)(nil), // 21: worker_pb.TaskLogResponse
  3195. (*TaskLogMetadata)(nil), // 22: worker_pb.TaskLogMetadata
  3196. (*TaskLogEntry)(nil), // 23: worker_pb.TaskLogEntry
  3197. (*MaintenanceConfig)(nil), // 24: worker_pb.MaintenanceConfig
  3198. (*MaintenancePolicy)(nil), // 25: worker_pb.MaintenancePolicy
  3199. (*TaskPolicy)(nil), // 26: worker_pb.TaskPolicy
  3200. (*VacuumTaskConfig)(nil), // 27: worker_pb.VacuumTaskConfig
  3201. (*ErasureCodingTaskConfig)(nil), // 28: worker_pb.ErasureCodingTaskConfig
  3202. (*BalanceTaskConfig)(nil), // 29: worker_pb.BalanceTaskConfig
  3203. (*ReplicationTaskConfig)(nil), // 30: worker_pb.ReplicationTaskConfig
  3204. (*MaintenanceTaskData)(nil), // 31: worker_pb.MaintenanceTaskData
  3205. (*TaskAssignmentRecord)(nil), // 32: worker_pb.TaskAssignmentRecord
  3206. (*TaskCreationMetrics)(nil), // 33: worker_pb.TaskCreationMetrics
  3207. (*VolumeHealthMetrics)(nil), // 34: worker_pb.VolumeHealthMetrics
  3208. (*TaskStateFile)(nil), // 35: worker_pb.TaskStateFile
  3209. nil, // 36: worker_pb.WorkerRegistration.MetadataEntry
  3210. nil, // 37: worker_pb.TaskAssignment.MetadataEntry
  3211. nil, // 38: worker_pb.TaskUpdate.MetadataEntry
  3212. nil, // 39: worker_pb.TaskComplete.ResultMetadataEntry
  3213. nil, // 40: worker_pb.TaskLogMetadata.CustomDataEntry
  3214. nil, // 41: worker_pb.TaskLogEntry.FieldsEntry
  3215. nil, // 42: worker_pb.MaintenancePolicy.TaskPoliciesEntry
  3216. nil, // 43: worker_pb.MaintenanceTaskData.TagsEntry
  3217. nil, // 44: worker_pb.TaskCreationMetrics.AdditionalDataEntry
  3218. }
  3219. var file_worker_proto_depIdxs = []int32{
  3220. 2, // 0: worker_pb.WorkerMessage.registration:type_name -> worker_pb.WorkerRegistration
  3221. 4, // 1: worker_pb.WorkerMessage.heartbeat:type_name -> worker_pb.WorkerHeartbeat
  3222. 6, // 2: worker_pb.WorkerMessage.task_request:type_name -> worker_pb.TaskRequest
  3223. 15, // 3: worker_pb.WorkerMessage.task_update:type_name -> worker_pb.TaskUpdate
  3224. 16, // 4: worker_pb.WorkerMessage.task_complete:type_name -> worker_pb.TaskComplete
  3225. 18, // 5: worker_pb.WorkerMessage.shutdown:type_name -> worker_pb.WorkerShutdown
  3226. 21, // 6: worker_pb.WorkerMessage.task_log_response:type_name -> worker_pb.TaskLogResponse
  3227. 3, // 7: worker_pb.AdminMessage.registration_response:type_name -> worker_pb.RegistrationResponse
  3228. 5, // 8: worker_pb.AdminMessage.heartbeat_response:type_name -> worker_pb.HeartbeatResponse
  3229. 7, // 9: worker_pb.AdminMessage.task_assignment:type_name -> worker_pb.TaskAssignment
  3230. 17, // 10: worker_pb.AdminMessage.task_cancellation:type_name -> worker_pb.TaskCancellation
  3231. 19, // 11: worker_pb.AdminMessage.admin_shutdown:type_name -> worker_pb.AdminShutdown
  3232. 20, // 12: worker_pb.AdminMessage.task_log_request:type_name -> worker_pb.TaskLogRequest
  3233. 36, // 13: worker_pb.WorkerRegistration.metadata:type_name -> worker_pb.WorkerRegistration.MetadataEntry
  3234. 8, // 14: worker_pb.TaskAssignment.params:type_name -> worker_pb.TaskParams
  3235. 37, // 15: worker_pb.TaskAssignment.metadata:type_name -> worker_pb.TaskAssignment.MetadataEntry
  3236. 11, // 16: worker_pb.TaskParams.sources:type_name -> worker_pb.TaskSource
  3237. 12, // 17: worker_pb.TaskParams.targets:type_name -> worker_pb.TaskTarget
  3238. 9, // 18: worker_pb.TaskParams.vacuum_params:type_name -> worker_pb.VacuumTaskParams
  3239. 10, // 19: worker_pb.TaskParams.erasure_coding_params:type_name -> worker_pb.ErasureCodingTaskParams
  3240. 13, // 20: worker_pb.TaskParams.balance_params:type_name -> worker_pb.BalanceTaskParams
  3241. 14, // 21: worker_pb.TaskParams.replication_params:type_name -> worker_pb.ReplicationTaskParams
  3242. 38, // 22: worker_pb.TaskUpdate.metadata:type_name -> worker_pb.TaskUpdate.MetadataEntry
  3243. 39, // 23: worker_pb.TaskComplete.result_metadata:type_name -> worker_pb.TaskComplete.ResultMetadataEntry
  3244. 22, // 24: worker_pb.TaskLogResponse.metadata:type_name -> worker_pb.TaskLogMetadata
  3245. 23, // 25: worker_pb.TaskLogResponse.log_entries:type_name -> worker_pb.TaskLogEntry
  3246. 40, // 26: worker_pb.TaskLogMetadata.custom_data:type_name -> worker_pb.TaskLogMetadata.CustomDataEntry
  3247. 41, // 27: worker_pb.TaskLogEntry.fields:type_name -> worker_pb.TaskLogEntry.FieldsEntry
  3248. 25, // 28: worker_pb.MaintenanceConfig.policy:type_name -> worker_pb.MaintenancePolicy
  3249. 42, // 29: worker_pb.MaintenancePolicy.task_policies:type_name -> worker_pb.MaintenancePolicy.TaskPoliciesEntry
  3250. 27, // 30: worker_pb.TaskPolicy.vacuum_config:type_name -> worker_pb.VacuumTaskConfig
  3251. 28, // 31: worker_pb.TaskPolicy.erasure_coding_config:type_name -> worker_pb.ErasureCodingTaskConfig
  3252. 29, // 32: worker_pb.TaskPolicy.balance_config:type_name -> worker_pb.BalanceTaskConfig
  3253. 30, // 33: worker_pb.TaskPolicy.replication_config:type_name -> worker_pb.ReplicationTaskConfig
  3254. 8, // 34: worker_pb.MaintenanceTaskData.typed_params:type_name -> worker_pb.TaskParams
  3255. 32, // 35: worker_pb.MaintenanceTaskData.assignment_history:type_name -> worker_pb.TaskAssignmentRecord
  3256. 43, // 36: worker_pb.MaintenanceTaskData.tags:type_name -> worker_pb.MaintenanceTaskData.TagsEntry
  3257. 33, // 37: worker_pb.MaintenanceTaskData.creation_metrics:type_name -> worker_pb.TaskCreationMetrics
  3258. 34, // 38: worker_pb.TaskCreationMetrics.volume_metrics:type_name -> worker_pb.VolumeHealthMetrics
  3259. 44, // 39: worker_pb.TaskCreationMetrics.additional_data:type_name -> worker_pb.TaskCreationMetrics.AdditionalDataEntry
  3260. 31, // 40: worker_pb.TaskStateFile.task:type_name -> worker_pb.MaintenanceTaskData
  3261. 26, // 41: worker_pb.MaintenancePolicy.TaskPoliciesEntry.value:type_name -> worker_pb.TaskPolicy
  3262. 0, // 42: worker_pb.WorkerService.WorkerStream:input_type -> worker_pb.WorkerMessage
  3263. 1, // 43: worker_pb.WorkerService.WorkerStream:output_type -> worker_pb.AdminMessage
  3264. 43, // [43:44] is the sub-list for method output_type
  3265. 42, // [42:43] is the sub-list for method input_type
  3266. 42, // [42:42] is the sub-list for extension type_name
  3267. 42, // [42:42] is the sub-list for extension extendee
  3268. 0, // [0:42] is the sub-list for field type_name
  3269. }
  3270. func init() { file_worker_proto_init() }
  3271. func file_worker_proto_init() {
  3272. if File_worker_proto != nil {
  3273. return
  3274. }
  3275. file_worker_proto_msgTypes[0].OneofWrappers = []any{
  3276. (*WorkerMessage_Registration)(nil),
  3277. (*WorkerMessage_Heartbeat)(nil),
  3278. (*WorkerMessage_TaskRequest)(nil),
  3279. (*WorkerMessage_TaskUpdate)(nil),
  3280. (*WorkerMessage_TaskComplete)(nil),
  3281. (*WorkerMessage_Shutdown)(nil),
  3282. (*WorkerMessage_TaskLogResponse)(nil),
  3283. }
  3284. file_worker_proto_msgTypes[1].OneofWrappers = []any{
  3285. (*AdminMessage_RegistrationResponse)(nil),
  3286. (*AdminMessage_HeartbeatResponse)(nil),
  3287. (*AdminMessage_TaskAssignment)(nil),
  3288. (*AdminMessage_TaskCancellation)(nil),
  3289. (*AdminMessage_AdminShutdown)(nil),
  3290. (*AdminMessage_TaskLogRequest)(nil),
  3291. }
  3292. file_worker_proto_msgTypes[8].OneofWrappers = []any{
  3293. (*TaskParams_VacuumParams)(nil),
  3294. (*TaskParams_ErasureCodingParams)(nil),
  3295. (*TaskParams_BalanceParams)(nil),
  3296. (*TaskParams_ReplicationParams)(nil),
  3297. }
  3298. file_worker_proto_msgTypes[26].OneofWrappers = []any{
  3299. (*TaskPolicy_VacuumConfig)(nil),
  3300. (*TaskPolicy_ErasureCodingConfig)(nil),
  3301. (*TaskPolicy_BalanceConfig)(nil),
  3302. (*TaskPolicy_ReplicationConfig)(nil),
  3303. }
  3304. type x struct{}
  3305. out := protoimpl.TypeBuilder{
  3306. File: protoimpl.DescBuilder{
  3307. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  3308. RawDescriptor: unsafe.Slice(unsafe.StringData(file_worker_proto_rawDesc), len(file_worker_proto_rawDesc)),
  3309. NumEnums: 0,
  3310. NumMessages: 45,
  3311. NumExtensions: 0,
  3312. NumServices: 1,
  3313. },
  3314. GoTypes: file_worker_proto_goTypes,
  3315. DependencyIndexes: file_worker_proto_depIdxs,
  3316. MessageInfos: file_worker_proto_msgTypes,
  3317. }.Build()
  3318. File_worker_proto = out.File
  3319. file_worker_proto_goTypes = nil
  3320. file_worker_proto_depIdxs = nil
  3321. }