watch.pb.go 113 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599
  1. // Code generated by protoc-gen-gogo.
  2. // source: watch.proto
  3. // DO NOT EDIT!
  4. package api
  5. import proto "github.com/gogo/protobuf/proto"
  6. import fmt "fmt"
  7. import math "math"
  8. import _ "github.com/gogo/protobuf/gogoproto"
  9. import _ "github.com/docker/swarmkit/protobuf/plugin"
  10. import github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
  11. import (
  12. context "golang.org/x/net/context"
  13. grpc "google.golang.org/grpc"
  14. )
  15. import raftselector "github.com/docker/swarmkit/manager/raftselector"
  16. import codes "google.golang.org/grpc/codes"
  17. import metadata "google.golang.org/grpc/metadata"
  18. import transport "google.golang.org/grpc/transport"
  19. import rafttime "time"
  20. import strings "strings"
  21. import reflect "reflect"
  22. import io "io"
  23. // Reference imports to suppress errors if they are not otherwise used.
  24. var _ = proto.Marshal
  25. var _ = fmt.Errorf
  26. var _ = math.Inf
  27. // WatchActionKind distinguishes between creations, updates, and removals. It
  28. // is structured as a bitmap so multiple kinds of events can be requested with
  29. // a mask.
  30. type WatchActionKind int32
  31. const (
  32. WatchActionKindUnknown WatchActionKind = 0
  33. WatchActionKindCreate WatchActionKind = 1
  34. WatchActionKindUpdate WatchActionKind = 2
  35. WatchActionKindRemove WatchActionKind = 4
  36. )
  37. var WatchActionKind_name = map[int32]string{
  38. 0: "WATCH_ACTION_UNKNOWN",
  39. 1: "WATCH_ACTION_CREATE",
  40. 2: "WATCH_ACTION_UPDATE",
  41. 4: "WATCH_ACTION_REMOVE",
  42. }
  43. var WatchActionKind_value = map[string]int32{
  44. "WATCH_ACTION_UNKNOWN": 0,
  45. "WATCH_ACTION_CREATE": 1,
  46. "WATCH_ACTION_UPDATE": 2,
  47. "WATCH_ACTION_REMOVE": 4,
  48. }
  49. func (x WatchActionKind) String() string {
  50. return proto.EnumName(WatchActionKind_name, int32(x))
  51. }
  52. func (WatchActionKind) EnumDescriptor() ([]byte, []int) { return fileDescriptorWatch, []int{0} }
  53. type Object struct {
  54. // Types that are valid to be assigned to Object:
  55. // *Object_Node
  56. // *Object_Service
  57. // *Object_Network
  58. // *Object_Task
  59. // *Object_Cluster
  60. // *Object_Secret
  61. // *Object_Resource
  62. // *Object_Extension
  63. // *Object_Config
  64. Object isObject_Object `protobuf_oneof:"Object"`
  65. }
  66. func (m *Object) Reset() { *m = Object{} }
  67. func (*Object) ProtoMessage() {}
  68. func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{0} }
  69. type isObject_Object interface {
  70. isObject_Object()
  71. MarshalTo([]byte) (int, error)
  72. Size() int
  73. }
  74. type Object_Node struct {
  75. Node *Node `protobuf:"bytes,1,opt,name=node,oneof"`
  76. }
  77. type Object_Service struct {
  78. Service *Service `protobuf:"bytes,2,opt,name=service,oneof"`
  79. }
  80. type Object_Network struct {
  81. Network *Network `protobuf:"bytes,3,opt,name=network,oneof"`
  82. }
  83. type Object_Task struct {
  84. Task *Task `protobuf:"bytes,4,opt,name=task,oneof"`
  85. }
  86. type Object_Cluster struct {
  87. Cluster *Cluster `protobuf:"bytes,5,opt,name=cluster,oneof"`
  88. }
  89. type Object_Secret struct {
  90. Secret *Secret `protobuf:"bytes,6,opt,name=secret,oneof"`
  91. }
  92. type Object_Resource struct {
  93. Resource *Resource `protobuf:"bytes,7,opt,name=resource,oneof"`
  94. }
  95. type Object_Extension struct {
  96. Extension *Extension `protobuf:"bytes,8,opt,name=extension,oneof"`
  97. }
  98. type Object_Config struct {
  99. Config *Config `protobuf:"bytes,9,opt,name=config,oneof"`
  100. }
  101. func (*Object_Node) isObject_Object() {}
  102. func (*Object_Service) isObject_Object() {}
  103. func (*Object_Network) isObject_Object() {}
  104. func (*Object_Task) isObject_Object() {}
  105. func (*Object_Cluster) isObject_Object() {}
  106. func (*Object_Secret) isObject_Object() {}
  107. func (*Object_Resource) isObject_Object() {}
  108. func (*Object_Extension) isObject_Object() {}
  109. func (*Object_Config) isObject_Object() {}
  110. func (m *Object) GetObject() isObject_Object {
  111. if m != nil {
  112. return m.Object
  113. }
  114. return nil
  115. }
  116. func (m *Object) GetNode() *Node {
  117. if x, ok := m.GetObject().(*Object_Node); ok {
  118. return x.Node
  119. }
  120. return nil
  121. }
  122. func (m *Object) GetService() *Service {
  123. if x, ok := m.GetObject().(*Object_Service); ok {
  124. return x.Service
  125. }
  126. return nil
  127. }
  128. func (m *Object) GetNetwork() *Network {
  129. if x, ok := m.GetObject().(*Object_Network); ok {
  130. return x.Network
  131. }
  132. return nil
  133. }
  134. func (m *Object) GetTask() *Task {
  135. if x, ok := m.GetObject().(*Object_Task); ok {
  136. return x.Task
  137. }
  138. return nil
  139. }
  140. func (m *Object) GetCluster() *Cluster {
  141. if x, ok := m.GetObject().(*Object_Cluster); ok {
  142. return x.Cluster
  143. }
  144. return nil
  145. }
  146. func (m *Object) GetSecret() *Secret {
  147. if x, ok := m.GetObject().(*Object_Secret); ok {
  148. return x.Secret
  149. }
  150. return nil
  151. }
  152. func (m *Object) GetResource() *Resource {
  153. if x, ok := m.GetObject().(*Object_Resource); ok {
  154. return x.Resource
  155. }
  156. return nil
  157. }
  158. func (m *Object) GetExtension() *Extension {
  159. if x, ok := m.GetObject().(*Object_Extension); ok {
  160. return x.Extension
  161. }
  162. return nil
  163. }
  164. func (m *Object) GetConfig() *Config {
  165. if x, ok := m.GetObject().(*Object_Config); ok {
  166. return x.Config
  167. }
  168. return nil
  169. }
  170. // XXX_OneofFuncs is for the internal use of the proto package.
  171. func (*Object) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  172. return _Object_OneofMarshaler, _Object_OneofUnmarshaler, _Object_OneofSizer, []interface{}{
  173. (*Object_Node)(nil),
  174. (*Object_Service)(nil),
  175. (*Object_Network)(nil),
  176. (*Object_Task)(nil),
  177. (*Object_Cluster)(nil),
  178. (*Object_Secret)(nil),
  179. (*Object_Resource)(nil),
  180. (*Object_Extension)(nil),
  181. (*Object_Config)(nil),
  182. }
  183. }
  184. func _Object_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  185. m := msg.(*Object)
  186. // Object
  187. switch x := m.Object.(type) {
  188. case *Object_Node:
  189. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  190. if err := b.EncodeMessage(x.Node); err != nil {
  191. return err
  192. }
  193. case *Object_Service:
  194. _ = b.EncodeVarint(2<<3 | proto.WireBytes)
  195. if err := b.EncodeMessage(x.Service); err != nil {
  196. return err
  197. }
  198. case *Object_Network:
  199. _ = b.EncodeVarint(3<<3 | proto.WireBytes)
  200. if err := b.EncodeMessage(x.Network); err != nil {
  201. return err
  202. }
  203. case *Object_Task:
  204. _ = b.EncodeVarint(4<<3 | proto.WireBytes)
  205. if err := b.EncodeMessage(x.Task); err != nil {
  206. return err
  207. }
  208. case *Object_Cluster:
  209. _ = b.EncodeVarint(5<<3 | proto.WireBytes)
  210. if err := b.EncodeMessage(x.Cluster); err != nil {
  211. return err
  212. }
  213. case *Object_Secret:
  214. _ = b.EncodeVarint(6<<3 | proto.WireBytes)
  215. if err := b.EncodeMessage(x.Secret); err != nil {
  216. return err
  217. }
  218. case *Object_Resource:
  219. _ = b.EncodeVarint(7<<3 | proto.WireBytes)
  220. if err := b.EncodeMessage(x.Resource); err != nil {
  221. return err
  222. }
  223. case *Object_Extension:
  224. _ = b.EncodeVarint(8<<3 | proto.WireBytes)
  225. if err := b.EncodeMessage(x.Extension); err != nil {
  226. return err
  227. }
  228. case *Object_Config:
  229. _ = b.EncodeVarint(9<<3 | proto.WireBytes)
  230. if err := b.EncodeMessage(x.Config); err != nil {
  231. return err
  232. }
  233. case nil:
  234. default:
  235. return fmt.Errorf("Object.Object has unexpected type %T", x)
  236. }
  237. return nil
  238. }
  239. func _Object_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  240. m := msg.(*Object)
  241. switch tag {
  242. case 1: // Object.node
  243. if wire != proto.WireBytes {
  244. return true, proto.ErrInternalBadWireType
  245. }
  246. msg := new(Node)
  247. err := b.DecodeMessage(msg)
  248. m.Object = &Object_Node{msg}
  249. return true, err
  250. case 2: // Object.service
  251. if wire != proto.WireBytes {
  252. return true, proto.ErrInternalBadWireType
  253. }
  254. msg := new(Service)
  255. err := b.DecodeMessage(msg)
  256. m.Object = &Object_Service{msg}
  257. return true, err
  258. case 3: // Object.network
  259. if wire != proto.WireBytes {
  260. return true, proto.ErrInternalBadWireType
  261. }
  262. msg := new(Network)
  263. err := b.DecodeMessage(msg)
  264. m.Object = &Object_Network{msg}
  265. return true, err
  266. case 4: // Object.task
  267. if wire != proto.WireBytes {
  268. return true, proto.ErrInternalBadWireType
  269. }
  270. msg := new(Task)
  271. err := b.DecodeMessage(msg)
  272. m.Object = &Object_Task{msg}
  273. return true, err
  274. case 5: // Object.cluster
  275. if wire != proto.WireBytes {
  276. return true, proto.ErrInternalBadWireType
  277. }
  278. msg := new(Cluster)
  279. err := b.DecodeMessage(msg)
  280. m.Object = &Object_Cluster{msg}
  281. return true, err
  282. case 6: // Object.secret
  283. if wire != proto.WireBytes {
  284. return true, proto.ErrInternalBadWireType
  285. }
  286. msg := new(Secret)
  287. err := b.DecodeMessage(msg)
  288. m.Object = &Object_Secret{msg}
  289. return true, err
  290. case 7: // Object.resource
  291. if wire != proto.WireBytes {
  292. return true, proto.ErrInternalBadWireType
  293. }
  294. msg := new(Resource)
  295. err := b.DecodeMessage(msg)
  296. m.Object = &Object_Resource{msg}
  297. return true, err
  298. case 8: // Object.extension
  299. if wire != proto.WireBytes {
  300. return true, proto.ErrInternalBadWireType
  301. }
  302. msg := new(Extension)
  303. err := b.DecodeMessage(msg)
  304. m.Object = &Object_Extension{msg}
  305. return true, err
  306. case 9: // Object.config
  307. if wire != proto.WireBytes {
  308. return true, proto.ErrInternalBadWireType
  309. }
  310. msg := new(Config)
  311. err := b.DecodeMessage(msg)
  312. m.Object = &Object_Config{msg}
  313. return true, err
  314. default:
  315. return false, nil
  316. }
  317. }
  318. func _Object_OneofSizer(msg proto.Message) (n int) {
  319. m := msg.(*Object)
  320. // Object
  321. switch x := m.Object.(type) {
  322. case *Object_Node:
  323. s := proto.Size(x.Node)
  324. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  325. n += proto.SizeVarint(uint64(s))
  326. n += s
  327. case *Object_Service:
  328. s := proto.Size(x.Service)
  329. n += proto.SizeVarint(2<<3 | proto.WireBytes)
  330. n += proto.SizeVarint(uint64(s))
  331. n += s
  332. case *Object_Network:
  333. s := proto.Size(x.Network)
  334. n += proto.SizeVarint(3<<3 | proto.WireBytes)
  335. n += proto.SizeVarint(uint64(s))
  336. n += s
  337. case *Object_Task:
  338. s := proto.Size(x.Task)
  339. n += proto.SizeVarint(4<<3 | proto.WireBytes)
  340. n += proto.SizeVarint(uint64(s))
  341. n += s
  342. case *Object_Cluster:
  343. s := proto.Size(x.Cluster)
  344. n += proto.SizeVarint(5<<3 | proto.WireBytes)
  345. n += proto.SizeVarint(uint64(s))
  346. n += s
  347. case *Object_Secret:
  348. s := proto.Size(x.Secret)
  349. n += proto.SizeVarint(6<<3 | proto.WireBytes)
  350. n += proto.SizeVarint(uint64(s))
  351. n += s
  352. case *Object_Resource:
  353. s := proto.Size(x.Resource)
  354. n += proto.SizeVarint(7<<3 | proto.WireBytes)
  355. n += proto.SizeVarint(uint64(s))
  356. n += s
  357. case *Object_Extension:
  358. s := proto.Size(x.Extension)
  359. n += proto.SizeVarint(8<<3 | proto.WireBytes)
  360. n += proto.SizeVarint(uint64(s))
  361. n += s
  362. case *Object_Config:
  363. s := proto.Size(x.Config)
  364. n += proto.SizeVarint(9<<3 | proto.WireBytes)
  365. n += proto.SizeVarint(uint64(s))
  366. n += s
  367. case nil:
  368. default:
  369. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  370. }
  371. return n
  372. }
  373. // FIXME(aaronl): These messages should ideally be embedded in SelectBy, but
  374. // protoc generates bad code for that.
  375. type SelectBySlot struct {
  376. ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
  377. Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"`
  378. }
  379. func (m *SelectBySlot) Reset() { *m = SelectBySlot{} }
  380. func (*SelectBySlot) ProtoMessage() {}
  381. func (*SelectBySlot) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{1} }
  382. type SelectByCustom struct {
  383. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
  384. Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"`
  385. Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
  386. }
  387. func (m *SelectByCustom) Reset() { *m = SelectByCustom{} }
  388. func (*SelectByCustom) ProtoMessage() {}
  389. func (*SelectByCustom) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{2} }
  390. type SelectBy struct {
  391. // TODO(aaronl): Are all of these things we want to expose in
  392. // the API? Exposing them may commit us to maintaining those
  393. // internal indices going forward.
  394. //
  395. // Types that are valid to be assigned to By:
  396. // *SelectBy_ID
  397. // *SelectBy_IDPrefix
  398. // *SelectBy_Name
  399. // *SelectBy_NamePrefix
  400. // *SelectBy_Custom
  401. // *SelectBy_CustomPrefix
  402. // *SelectBy_ServiceID
  403. // *SelectBy_NodeID
  404. // *SelectBy_Slot
  405. // *SelectBy_DesiredState
  406. // *SelectBy_Role
  407. // *SelectBy_Membership
  408. // *SelectBy_ReferencedNetworkID
  409. // *SelectBy_ReferencedSecretID
  410. // *SelectBy_ReferencedConfigID
  411. // *SelectBy_Kind
  412. By isSelectBy_By `protobuf_oneof:"By"`
  413. }
  414. func (m *SelectBy) Reset() { *m = SelectBy{} }
  415. func (*SelectBy) ProtoMessage() {}
  416. func (*SelectBy) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{3} }
  417. type isSelectBy_By interface {
  418. isSelectBy_By()
  419. MarshalTo([]byte) (int, error)
  420. Size() int
  421. }
  422. type SelectBy_ID struct {
  423. ID string `protobuf:"bytes,1,opt,name=id,proto3,oneof"`
  424. }
  425. type SelectBy_IDPrefix struct {
  426. IDPrefix string `protobuf:"bytes,2,opt,name=id_prefix,json=idPrefix,proto3,oneof"`
  427. }
  428. type SelectBy_Name struct {
  429. Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof"`
  430. }
  431. type SelectBy_NamePrefix struct {
  432. NamePrefix string `protobuf:"bytes,4,opt,name=name_prefix,json=namePrefix,proto3,oneof"`
  433. }
  434. type SelectBy_Custom struct {
  435. Custom *SelectByCustom `protobuf:"bytes,5,opt,name=custom,oneof"`
  436. }
  437. type SelectBy_CustomPrefix struct {
  438. CustomPrefix *SelectByCustom `protobuf:"bytes,6,opt,name=custom_prefix,json=customPrefix,oneof"`
  439. }
  440. type SelectBy_ServiceID struct {
  441. ServiceID string `protobuf:"bytes,7,opt,name=service_id,json=serviceId,proto3,oneof"`
  442. }
  443. type SelectBy_NodeID struct {
  444. NodeID string `protobuf:"bytes,8,opt,name=node_id,json=nodeId,proto3,oneof"`
  445. }
  446. type SelectBy_Slot struct {
  447. Slot *SelectBySlot `protobuf:"bytes,9,opt,name=slot,oneof"`
  448. }
  449. type SelectBy_DesiredState struct {
  450. DesiredState TaskState `protobuf:"varint,10,opt,name=desired_state,json=desiredState,proto3,enum=docker.swarmkit.v1.TaskState,oneof"`
  451. }
  452. type SelectBy_Role struct {
  453. Role NodeRole `protobuf:"varint,11,opt,name=role,proto3,enum=docker.swarmkit.v1.NodeRole,oneof"`
  454. }
  455. type SelectBy_Membership struct {
  456. Membership NodeSpec_Membership `protobuf:"varint,12,opt,name=membership,proto3,enum=docker.swarmkit.v1.NodeSpec_Membership,oneof"`
  457. }
  458. type SelectBy_ReferencedNetworkID struct {
  459. ReferencedNetworkID string `protobuf:"bytes,13,opt,name=referenced_network_id,json=referencedNetworkId,proto3,oneof"`
  460. }
  461. type SelectBy_ReferencedSecretID struct {
  462. ReferencedSecretID string `protobuf:"bytes,14,opt,name=referenced_secret_id,json=referencedSecretId,proto3,oneof"`
  463. }
  464. type SelectBy_ReferencedConfigID struct {
  465. ReferencedConfigID string `protobuf:"bytes,16,opt,name=referenced_config_id,json=referencedConfigId,proto3,oneof"`
  466. }
  467. type SelectBy_Kind struct {
  468. Kind string `protobuf:"bytes,15,opt,name=kind,proto3,oneof"`
  469. }
  470. func (*SelectBy_ID) isSelectBy_By() {}
  471. func (*SelectBy_IDPrefix) isSelectBy_By() {}
  472. func (*SelectBy_Name) isSelectBy_By() {}
  473. func (*SelectBy_NamePrefix) isSelectBy_By() {}
  474. func (*SelectBy_Custom) isSelectBy_By() {}
  475. func (*SelectBy_CustomPrefix) isSelectBy_By() {}
  476. func (*SelectBy_ServiceID) isSelectBy_By() {}
  477. func (*SelectBy_NodeID) isSelectBy_By() {}
  478. func (*SelectBy_Slot) isSelectBy_By() {}
  479. func (*SelectBy_DesiredState) isSelectBy_By() {}
  480. func (*SelectBy_Role) isSelectBy_By() {}
  481. func (*SelectBy_Membership) isSelectBy_By() {}
  482. func (*SelectBy_ReferencedNetworkID) isSelectBy_By() {}
  483. func (*SelectBy_ReferencedSecretID) isSelectBy_By() {}
  484. func (*SelectBy_ReferencedConfigID) isSelectBy_By() {}
  485. func (*SelectBy_Kind) isSelectBy_By() {}
  486. func (m *SelectBy) GetBy() isSelectBy_By {
  487. if m != nil {
  488. return m.By
  489. }
  490. return nil
  491. }
  492. func (m *SelectBy) GetID() string {
  493. if x, ok := m.GetBy().(*SelectBy_ID); ok {
  494. return x.ID
  495. }
  496. return ""
  497. }
  498. func (m *SelectBy) GetIDPrefix() string {
  499. if x, ok := m.GetBy().(*SelectBy_IDPrefix); ok {
  500. return x.IDPrefix
  501. }
  502. return ""
  503. }
  504. func (m *SelectBy) GetName() string {
  505. if x, ok := m.GetBy().(*SelectBy_Name); ok {
  506. return x.Name
  507. }
  508. return ""
  509. }
  510. func (m *SelectBy) GetNamePrefix() string {
  511. if x, ok := m.GetBy().(*SelectBy_NamePrefix); ok {
  512. return x.NamePrefix
  513. }
  514. return ""
  515. }
  516. func (m *SelectBy) GetCustom() *SelectByCustom {
  517. if x, ok := m.GetBy().(*SelectBy_Custom); ok {
  518. return x.Custom
  519. }
  520. return nil
  521. }
  522. func (m *SelectBy) GetCustomPrefix() *SelectByCustom {
  523. if x, ok := m.GetBy().(*SelectBy_CustomPrefix); ok {
  524. return x.CustomPrefix
  525. }
  526. return nil
  527. }
  528. func (m *SelectBy) GetServiceID() string {
  529. if x, ok := m.GetBy().(*SelectBy_ServiceID); ok {
  530. return x.ServiceID
  531. }
  532. return ""
  533. }
  534. func (m *SelectBy) GetNodeID() string {
  535. if x, ok := m.GetBy().(*SelectBy_NodeID); ok {
  536. return x.NodeID
  537. }
  538. return ""
  539. }
  540. func (m *SelectBy) GetSlot() *SelectBySlot {
  541. if x, ok := m.GetBy().(*SelectBy_Slot); ok {
  542. return x.Slot
  543. }
  544. return nil
  545. }
  546. func (m *SelectBy) GetDesiredState() TaskState {
  547. if x, ok := m.GetBy().(*SelectBy_DesiredState); ok {
  548. return x.DesiredState
  549. }
  550. return TaskStateNew
  551. }
  552. func (m *SelectBy) GetRole() NodeRole {
  553. if x, ok := m.GetBy().(*SelectBy_Role); ok {
  554. return x.Role
  555. }
  556. return NodeRoleWorker
  557. }
  558. func (m *SelectBy) GetMembership() NodeSpec_Membership {
  559. if x, ok := m.GetBy().(*SelectBy_Membership); ok {
  560. return x.Membership
  561. }
  562. return NodeMembershipPending
  563. }
  564. func (m *SelectBy) GetReferencedNetworkID() string {
  565. if x, ok := m.GetBy().(*SelectBy_ReferencedNetworkID); ok {
  566. return x.ReferencedNetworkID
  567. }
  568. return ""
  569. }
  570. func (m *SelectBy) GetReferencedSecretID() string {
  571. if x, ok := m.GetBy().(*SelectBy_ReferencedSecretID); ok {
  572. return x.ReferencedSecretID
  573. }
  574. return ""
  575. }
  576. func (m *SelectBy) GetReferencedConfigID() string {
  577. if x, ok := m.GetBy().(*SelectBy_ReferencedConfigID); ok {
  578. return x.ReferencedConfigID
  579. }
  580. return ""
  581. }
  582. func (m *SelectBy) GetKind() string {
  583. if x, ok := m.GetBy().(*SelectBy_Kind); ok {
  584. return x.Kind
  585. }
  586. return ""
  587. }
  588. // XXX_OneofFuncs is for the internal use of the proto package.
  589. func (*SelectBy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  590. return _SelectBy_OneofMarshaler, _SelectBy_OneofUnmarshaler, _SelectBy_OneofSizer, []interface{}{
  591. (*SelectBy_ID)(nil),
  592. (*SelectBy_IDPrefix)(nil),
  593. (*SelectBy_Name)(nil),
  594. (*SelectBy_NamePrefix)(nil),
  595. (*SelectBy_Custom)(nil),
  596. (*SelectBy_CustomPrefix)(nil),
  597. (*SelectBy_ServiceID)(nil),
  598. (*SelectBy_NodeID)(nil),
  599. (*SelectBy_Slot)(nil),
  600. (*SelectBy_DesiredState)(nil),
  601. (*SelectBy_Role)(nil),
  602. (*SelectBy_Membership)(nil),
  603. (*SelectBy_ReferencedNetworkID)(nil),
  604. (*SelectBy_ReferencedSecretID)(nil),
  605. (*SelectBy_ReferencedConfigID)(nil),
  606. (*SelectBy_Kind)(nil),
  607. }
  608. }
  609. func _SelectBy_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  610. m := msg.(*SelectBy)
  611. // By
  612. switch x := m.By.(type) {
  613. case *SelectBy_ID:
  614. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  615. _ = b.EncodeStringBytes(x.ID)
  616. case *SelectBy_IDPrefix:
  617. _ = b.EncodeVarint(2<<3 | proto.WireBytes)
  618. _ = b.EncodeStringBytes(x.IDPrefix)
  619. case *SelectBy_Name:
  620. _ = b.EncodeVarint(3<<3 | proto.WireBytes)
  621. _ = b.EncodeStringBytes(x.Name)
  622. case *SelectBy_NamePrefix:
  623. _ = b.EncodeVarint(4<<3 | proto.WireBytes)
  624. _ = b.EncodeStringBytes(x.NamePrefix)
  625. case *SelectBy_Custom:
  626. _ = b.EncodeVarint(5<<3 | proto.WireBytes)
  627. if err := b.EncodeMessage(x.Custom); err != nil {
  628. return err
  629. }
  630. case *SelectBy_CustomPrefix:
  631. _ = b.EncodeVarint(6<<3 | proto.WireBytes)
  632. if err := b.EncodeMessage(x.CustomPrefix); err != nil {
  633. return err
  634. }
  635. case *SelectBy_ServiceID:
  636. _ = b.EncodeVarint(7<<3 | proto.WireBytes)
  637. _ = b.EncodeStringBytes(x.ServiceID)
  638. case *SelectBy_NodeID:
  639. _ = b.EncodeVarint(8<<3 | proto.WireBytes)
  640. _ = b.EncodeStringBytes(x.NodeID)
  641. case *SelectBy_Slot:
  642. _ = b.EncodeVarint(9<<3 | proto.WireBytes)
  643. if err := b.EncodeMessage(x.Slot); err != nil {
  644. return err
  645. }
  646. case *SelectBy_DesiredState:
  647. _ = b.EncodeVarint(10<<3 | proto.WireVarint)
  648. _ = b.EncodeVarint(uint64(x.DesiredState))
  649. case *SelectBy_Role:
  650. _ = b.EncodeVarint(11<<3 | proto.WireVarint)
  651. _ = b.EncodeVarint(uint64(x.Role))
  652. case *SelectBy_Membership:
  653. _ = b.EncodeVarint(12<<3 | proto.WireVarint)
  654. _ = b.EncodeVarint(uint64(x.Membership))
  655. case *SelectBy_ReferencedNetworkID:
  656. _ = b.EncodeVarint(13<<3 | proto.WireBytes)
  657. _ = b.EncodeStringBytes(x.ReferencedNetworkID)
  658. case *SelectBy_ReferencedSecretID:
  659. _ = b.EncodeVarint(14<<3 | proto.WireBytes)
  660. _ = b.EncodeStringBytes(x.ReferencedSecretID)
  661. case *SelectBy_ReferencedConfigID:
  662. _ = b.EncodeVarint(16<<3 | proto.WireBytes)
  663. _ = b.EncodeStringBytes(x.ReferencedConfigID)
  664. case *SelectBy_Kind:
  665. _ = b.EncodeVarint(15<<3 | proto.WireBytes)
  666. _ = b.EncodeStringBytes(x.Kind)
  667. case nil:
  668. default:
  669. return fmt.Errorf("SelectBy.By has unexpected type %T", x)
  670. }
  671. return nil
  672. }
  673. func _SelectBy_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  674. m := msg.(*SelectBy)
  675. switch tag {
  676. case 1: // By.id
  677. if wire != proto.WireBytes {
  678. return true, proto.ErrInternalBadWireType
  679. }
  680. x, err := b.DecodeStringBytes()
  681. m.By = &SelectBy_ID{x}
  682. return true, err
  683. case 2: // By.id_prefix
  684. if wire != proto.WireBytes {
  685. return true, proto.ErrInternalBadWireType
  686. }
  687. x, err := b.DecodeStringBytes()
  688. m.By = &SelectBy_IDPrefix{x}
  689. return true, err
  690. case 3: // By.name
  691. if wire != proto.WireBytes {
  692. return true, proto.ErrInternalBadWireType
  693. }
  694. x, err := b.DecodeStringBytes()
  695. m.By = &SelectBy_Name{x}
  696. return true, err
  697. case 4: // By.name_prefix
  698. if wire != proto.WireBytes {
  699. return true, proto.ErrInternalBadWireType
  700. }
  701. x, err := b.DecodeStringBytes()
  702. m.By = &SelectBy_NamePrefix{x}
  703. return true, err
  704. case 5: // By.custom
  705. if wire != proto.WireBytes {
  706. return true, proto.ErrInternalBadWireType
  707. }
  708. msg := new(SelectByCustom)
  709. err := b.DecodeMessage(msg)
  710. m.By = &SelectBy_Custom{msg}
  711. return true, err
  712. case 6: // By.custom_prefix
  713. if wire != proto.WireBytes {
  714. return true, proto.ErrInternalBadWireType
  715. }
  716. msg := new(SelectByCustom)
  717. err := b.DecodeMessage(msg)
  718. m.By = &SelectBy_CustomPrefix{msg}
  719. return true, err
  720. case 7: // By.service_id
  721. if wire != proto.WireBytes {
  722. return true, proto.ErrInternalBadWireType
  723. }
  724. x, err := b.DecodeStringBytes()
  725. m.By = &SelectBy_ServiceID{x}
  726. return true, err
  727. case 8: // By.node_id
  728. if wire != proto.WireBytes {
  729. return true, proto.ErrInternalBadWireType
  730. }
  731. x, err := b.DecodeStringBytes()
  732. m.By = &SelectBy_NodeID{x}
  733. return true, err
  734. case 9: // By.slot
  735. if wire != proto.WireBytes {
  736. return true, proto.ErrInternalBadWireType
  737. }
  738. msg := new(SelectBySlot)
  739. err := b.DecodeMessage(msg)
  740. m.By = &SelectBy_Slot{msg}
  741. return true, err
  742. case 10: // By.desired_state
  743. if wire != proto.WireVarint {
  744. return true, proto.ErrInternalBadWireType
  745. }
  746. x, err := b.DecodeVarint()
  747. m.By = &SelectBy_DesiredState{TaskState(x)}
  748. return true, err
  749. case 11: // By.role
  750. if wire != proto.WireVarint {
  751. return true, proto.ErrInternalBadWireType
  752. }
  753. x, err := b.DecodeVarint()
  754. m.By = &SelectBy_Role{NodeRole(x)}
  755. return true, err
  756. case 12: // By.membership
  757. if wire != proto.WireVarint {
  758. return true, proto.ErrInternalBadWireType
  759. }
  760. x, err := b.DecodeVarint()
  761. m.By = &SelectBy_Membership{NodeSpec_Membership(x)}
  762. return true, err
  763. case 13: // By.referenced_network_id
  764. if wire != proto.WireBytes {
  765. return true, proto.ErrInternalBadWireType
  766. }
  767. x, err := b.DecodeStringBytes()
  768. m.By = &SelectBy_ReferencedNetworkID{x}
  769. return true, err
  770. case 14: // By.referenced_secret_id
  771. if wire != proto.WireBytes {
  772. return true, proto.ErrInternalBadWireType
  773. }
  774. x, err := b.DecodeStringBytes()
  775. m.By = &SelectBy_ReferencedSecretID{x}
  776. return true, err
  777. case 16: // By.referenced_config_id
  778. if wire != proto.WireBytes {
  779. return true, proto.ErrInternalBadWireType
  780. }
  781. x, err := b.DecodeStringBytes()
  782. m.By = &SelectBy_ReferencedConfigID{x}
  783. return true, err
  784. case 15: // By.kind
  785. if wire != proto.WireBytes {
  786. return true, proto.ErrInternalBadWireType
  787. }
  788. x, err := b.DecodeStringBytes()
  789. m.By = &SelectBy_Kind{x}
  790. return true, err
  791. default:
  792. return false, nil
  793. }
  794. }
  795. func _SelectBy_OneofSizer(msg proto.Message) (n int) {
  796. m := msg.(*SelectBy)
  797. // By
  798. switch x := m.By.(type) {
  799. case *SelectBy_ID:
  800. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  801. n += proto.SizeVarint(uint64(len(x.ID)))
  802. n += len(x.ID)
  803. case *SelectBy_IDPrefix:
  804. n += proto.SizeVarint(2<<3 | proto.WireBytes)
  805. n += proto.SizeVarint(uint64(len(x.IDPrefix)))
  806. n += len(x.IDPrefix)
  807. case *SelectBy_Name:
  808. n += proto.SizeVarint(3<<3 | proto.WireBytes)
  809. n += proto.SizeVarint(uint64(len(x.Name)))
  810. n += len(x.Name)
  811. case *SelectBy_NamePrefix:
  812. n += proto.SizeVarint(4<<3 | proto.WireBytes)
  813. n += proto.SizeVarint(uint64(len(x.NamePrefix)))
  814. n += len(x.NamePrefix)
  815. case *SelectBy_Custom:
  816. s := proto.Size(x.Custom)
  817. n += proto.SizeVarint(5<<3 | proto.WireBytes)
  818. n += proto.SizeVarint(uint64(s))
  819. n += s
  820. case *SelectBy_CustomPrefix:
  821. s := proto.Size(x.CustomPrefix)
  822. n += proto.SizeVarint(6<<3 | proto.WireBytes)
  823. n += proto.SizeVarint(uint64(s))
  824. n += s
  825. case *SelectBy_ServiceID:
  826. n += proto.SizeVarint(7<<3 | proto.WireBytes)
  827. n += proto.SizeVarint(uint64(len(x.ServiceID)))
  828. n += len(x.ServiceID)
  829. case *SelectBy_NodeID:
  830. n += proto.SizeVarint(8<<3 | proto.WireBytes)
  831. n += proto.SizeVarint(uint64(len(x.NodeID)))
  832. n += len(x.NodeID)
  833. case *SelectBy_Slot:
  834. s := proto.Size(x.Slot)
  835. n += proto.SizeVarint(9<<3 | proto.WireBytes)
  836. n += proto.SizeVarint(uint64(s))
  837. n += s
  838. case *SelectBy_DesiredState:
  839. n += proto.SizeVarint(10<<3 | proto.WireVarint)
  840. n += proto.SizeVarint(uint64(x.DesiredState))
  841. case *SelectBy_Role:
  842. n += proto.SizeVarint(11<<3 | proto.WireVarint)
  843. n += proto.SizeVarint(uint64(x.Role))
  844. case *SelectBy_Membership:
  845. n += proto.SizeVarint(12<<3 | proto.WireVarint)
  846. n += proto.SizeVarint(uint64(x.Membership))
  847. case *SelectBy_ReferencedNetworkID:
  848. n += proto.SizeVarint(13<<3 | proto.WireBytes)
  849. n += proto.SizeVarint(uint64(len(x.ReferencedNetworkID)))
  850. n += len(x.ReferencedNetworkID)
  851. case *SelectBy_ReferencedSecretID:
  852. n += proto.SizeVarint(14<<3 | proto.WireBytes)
  853. n += proto.SizeVarint(uint64(len(x.ReferencedSecretID)))
  854. n += len(x.ReferencedSecretID)
  855. case *SelectBy_ReferencedConfigID:
  856. n += proto.SizeVarint(16<<3 | proto.WireBytes)
  857. n += proto.SizeVarint(uint64(len(x.ReferencedConfigID)))
  858. n += len(x.ReferencedConfigID)
  859. case *SelectBy_Kind:
  860. n += proto.SizeVarint(15<<3 | proto.WireBytes)
  861. n += proto.SizeVarint(uint64(len(x.Kind)))
  862. n += len(x.Kind)
  863. case nil:
  864. default:
  865. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  866. }
  867. return n
  868. }
  869. type WatchRequest struct {
  870. // Multiple entries are combined using OR logic - i.e. if an event
  871. // matches all of the selectors specified in any single watch entry,
  872. // the event will be sent to the client.
  873. Entries []*WatchRequest_WatchEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
  874. // ResumeFrom provides an version to resume the watch from, if non-nil.
  875. // The watch will return changes since this version, and continue to
  876. // return new changes afterwards. Watch will return an error if the
  877. // server has compacted its log and no longer has complete history to
  878. // this point.
  879. ResumeFrom *Version `protobuf:"bytes,2,opt,name=resume_from,json=resumeFrom" json:"resume_from,omitempty"`
  880. // IncludeOldObject causes WatchMessages to include a copy of the
  881. // previous version of the object on updates. Note that only live
  882. // changes will include the old object (not historical changes
  883. // retrieved using ResumeFrom).
  884. IncludeOldObject bool `protobuf:"varint,3,opt,name=include_old_object,json=includeOldObject,proto3" json:"include_old_object,omitempty"`
  885. }
  886. func (m *WatchRequest) Reset() { *m = WatchRequest{} }
  887. func (*WatchRequest) ProtoMessage() {}
  888. func (*WatchRequest) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{4} }
  889. type WatchRequest_WatchEntry struct {
  890. // Kind can contain a builtin type such as "node", "secret", etc. or
  891. // the kind specified by a custom-defined object.
  892. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
  893. // Action (create/update/delete)
  894. // This is a bitmask, so multiple actions may be OR'd together
  895. Action WatchActionKind `protobuf:"varint,2,opt,name=action,proto3,enum=docker.swarmkit.v1.WatchActionKind" json:"action,omitempty"`
  896. // Filters are combined using AND logic - an event must match
  897. // all of them to pass the filter.
  898. Filters []*SelectBy `protobuf:"bytes,3,rep,name=filters" json:"filters,omitempty"`
  899. }
  900. func (m *WatchRequest_WatchEntry) Reset() { *m = WatchRequest_WatchEntry{} }
  901. func (*WatchRequest_WatchEntry) ProtoMessage() {}
  902. func (*WatchRequest_WatchEntry) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{4, 0} }
  903. // WatchMessage is the type of the stream that's returned to the client by
  904. // Watch. Note that the first item of this stream will always be a WatchMessage
  905. // with a nil Object, to signal that the stream has started.
  906. type WatchMessage struct {
  907. Events []*WatchMessage_Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
  908. // Index versions this change to the data store. It can be used to
  909. // resume the watch from this point.
  910. Version *Version `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
  911. }
  912. func (m *WatchMessage) Reset() { *m = WatchMessage{} }
  913. func (*WatchMessage) ProtoMessage() {}
  914. func (*WatchMessage) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{5} }
  915. type WatchMessage_Event struct {
  916. // Action (create/update/delete)
  917. // Note that WatchMessage does not expose "commit" events that
  918. // mark transaction boundaries.
  919. Action WatchActionKind `protobuf:"varint,1,opt,name=action,proto3,enum=docker.swarmkit.v1.WatchActionKind" json:"action,omitempty"`
  920. // Matched object
  921. Object *Object `protobuf:"bytes,2,opt,name=object" json:"object,omitempty"`
  922. // For updates, OldObject will optionally be included in the
  923. // watch message, containing the previous version of the
  924. // object, if IncludeOldObject was set in WatchRequest.
  925. OldObject *Object `protobuf:"bytes,3,opt,name=old_object,json=oldObject" json:"old_object,omitempty"`
  926. }
  927. func (m *WatchMessage_Event) Reset() { *m = WatchMessage_Event{} }
  928. func (*WatchMessage_Event) ProtoMessage() {}
  929. func (*WatchMessage_Event) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{5, 0} }
  930. func init() {
  931. proto.RegisterType((*Object)(nil), "docker.swarmkit.v1.Object")
  932. proto.RegisterType((*SelectBySlot)(nil), "docker.swarmkit.v1.SelectBySlot")
  933. proto.RegisterType((*SelectByCustom)(nil), "docker.swarmkit.v1.SelectByCustom")
  934. proto.RegisterType((*SelectBy)(nil), "docker.swarmkit.v1.SelectBy")
  935. proto.RegisterType((*WatchRequest)(nil), "docker.swarmkit.v1.WatchRequest")
  936. proto.RegisterType((*WatchRequest_WatchEntry)(nil), "docker.swarmkit.v1.WatchRequest.WatchEntry")
  937. proto.RegisterType((*WatchMessage)(nil), "docker.swarmkit.v1.WatchMessage")
  938. proto.RegisterType((*WatchMessage_Event)(nil), "docker.swarmkit.v1.WatchMessage.Event")
  939. proto.RegisterEnum("docker.swarmkit.v1.WatchActionKind", WatchActionKind_name, WatchActionKind_value)
  940. }
  941. type authenticatedWrapperWatchServer struct {
  942. local WatchServer
  943. authorize func(context.Context, []string) error
  944. }
  945. func NewAuthenticatedWrapperWatchServer(local WatchServer, authorize func(context.Context, []string) error) WatchServer {
  946. return &authenticatedWrapperWatchServer{
  947. local: local,
  948. authorize: authorize,
  949. }
  950. }
  951. func (p *authenticatedWrapperWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error {
  952. if err := p.authorize(stream.Context(), []string{"swarm-manager"}); err != nil {
  953. return err
  954. }
  955. return p.local.Watch(r, stream)
  956. }
  957. func (m *Object) Copy() *Object {
  958. if m == nil {
  959. return nil
  960. }
  961. o := &Object{}
  962. o.CopyFrom(m)
  963. return o
  964. }
  965. func (m *Object) CopyFrom(src interface{}) {
  966. o := src.(*Object)
  967. *m = *o
  968. if o.Object != nil {
  969. switch o.Object.(type) {
  970. case *Object_Node:
  971. v := Object_Node{
  972. Node: &Node{},
  973. }
  974. github_com_docker_swarmkit_api_deepcopy.Copy(v.Node, o.GetNode())
  975. m.Object = &v
  976. case *Object_Service:
  977. v := Object_Service{
  978. Service: &Service{},
  979. }
  980. github_com_docker_swarmkit_api_deepcopy.Copy(v.Service, o.GetService())
  981. m.Object = &v
  982. case *Object_Network:
  983. v := Object_Network{
  984. Network: &Network{},
  985. }
  986. github_com_docker_swarmkit_api_deepcopy.Copy(v.Network, o.GetNetwork())
  987. m.Object = &v
  988. case *Object_Task:
  989. v := Object_Task{
  990. Task: &Task{},
  991. }
  992. github_com_docker_swarmkit_api_deepcopy.Copy(v.Task, o.GetTask())
  993. m.Object = &v
  994. case *Object_Cluster:
  995. v := Object_Cluster{
  996. Cluster: &Cluster{},
  997. }
  998. github_com_docker_swarmkit_api_deepcopy.Copy(v.Cluster, o.GetCluster())
  999. m.Object = &v
  1000. case *Object_Secret:
  1001. v := Object_Secret{
  1002. Secret: &Secret{},
  1003. }
  1004. github_com_docker_swarmkit_api_deepcopy.Copy(v.Secret, o.GetSecret())
  1005. m.Object = &v
  1006. case *Object_Resource:
  1007. v := Object_Resource{
  1008. Resource: &Resource{},
  1009. }
  1010. github_com_docker_swarmkit_api_deepcopy.Copy(v.Resource, o.GetResource())
  1011. m.Object = &v
  1012. case *Object_Extension:
  1013. v := Object_Extension{
  1014. Extension: &Extension{},
  1015. }
  1016. github_com_docker_swarmkit_api_deepcopy.Copy(v.Extension, o.GetExtension())
  1017. m.Object = &v
  1018. case *Object_Config:
  1019. v := Object_Config{
  1020. Config: &Config{},
  1021. }
  1022. github_com_docker_swarmkit_api_deepcopy.Copy(v.Config, o.GetConfig())
  1023. m.Object = &v
  1024. }
  1025. }
  1026. }
  1027. func (m *SelectBySlot) Copy() *SelectBySlot {
  1028. if m == nil {
  1029. return nil
  1030. }
  1031. o := &SelectBySlot{}
  1032. o.CopyFrom(m)
  1033. return o
  1034. }
  1035. func (m *SelectBySlot) CopyFrom(src interface{}) {
  1036. o := src.(*SelectBySlot)
  1037. *m = *o
  1038. }
  1039. func (m *SelectByCustom) Copy() *SelectByCustom {
  1040. if m == nil {
  1041. return nil
  1042. }
  1043. o := &SelectByCustom{}
  1044. o.CopyFrom(m)
  1045. return o
  1046. }
  1047. func (m *SelectByCustom) CopyFrom(src interface{}) {
  1048. o := src.(*SelectByCustom)
  1049. *m = *o
  1050. }
  1051. func (m *SelectBy) Copy() *SelectBy {
  1052. if m == nil {
  1053. return nil
  1054. }
  1055. o := &SelectBy{}
  1056. o.CopyFrom(m)
  1057. return o
  1058. }
  1059. func (m *SelectBy) CopyFrom(src interface{}) {
  1060. o := src.(*SelectBy)
  1061. *m = *o
  1062. if o.By != nil {
  1063. switch o.By.(type) {
  1064. case *SelectBy_ID:
  1065. v := SelectBy_ID{
  1066. ID: o.GetID(),
  1067. }
  1068. m.By = &v
  1069. case *SelectBy_IDPrefix:
  1070. v := SelectBy_IDPrefix{
  1071. IDPrefix: o.GetIDPrefix(),
  1072. }
  1073. m.By = &v
  1074. case *SelectBy_Name:
  1075. v := SelectBy_Name{
  1076. Name: o.GetName(),
  1077. }
  1078. m.By = &v
  1079. case *SelectBy_NamePrefix:
  1080. v := SelectBy_NamePrefix{
  1081. NamePrefix: o.GetNamePrefix(),
  1082. }
  1083. m.By = &v
  1084. case *SelectBy_Custom:
  1085. v := SelectBy_Custom{
  1086. Custom: &SelectByCustom{},
  1087. }
  1088. github_com_docker_swarmkit_api_deepcopy.Copy(v.Custom, o.GetCustom())
  1089. m.By = &v
  1090. case *SelectBy_CustomPrefix:
  1091. v := SelectBy_CustomPrefix{
  1092. CustomPrefix: &SelectByCustom{},
  1093. }
  1094. github_com_docker_swarmkit_api_deepcopy.Copy(v.CustomPrefix, o.GetCustomPrefix())
  1095. m.By = &v
  1096. case *SelectBy_ServiceID:
  1097. v := SelectBy_ServiceID{
  1098. ServiceID: o.GetServiceID(),
  1099. }
  1100. m.By = &v
  1101. case *SelectBy_NodeID:
  1102. v := SelectBy_NodeID{
  1103. NodeID: o.GetNodeID(),
  1104. }
  1105. m.By = &v
  1106. case *SelectBy_Slot:
  1107. v := SelectBy_Slot{
  1108. Slot: &SelectBySlot{},
  1109. }
  1110. github_com_docker_swarmkit_api_deepcopy.Copy(v.Slot, o.GetSlot())
  1111. m.By = &v
  1112. case *SelectBy_DesiredState:
  1113. v := SelectBy_DesiredState{
  1114. DesiredState: o.GetDesiredState(),
  1115. }
  1116. m.By = &v
  1117. case *SelectBy_Role:
  1118. v := SelectBy_Role{
  1119. Role: o.GetRole(),
  1120. }
  1121. m.By = &v
  1122. case *SelectBy_Membership:
  1123. v := SelectBy_Membership{
  1124. Membership: o.GetMembership(),
  1125. }
  1126. m.By = &v
  1127. case *SelectBy_ReferencedNetworkID:
  1128. v := SelectBy_ReferencedNetworkID{
  1129. ReferencedNetworkID: o.GetReferencedNetworkID(),
  1130. }
  1131. m.By = &v
  1132. case *SelectBy_ReferencedSecretID:
  1133. v := SelectBy_ReferencedSecretID{
  1134. ReferencedSecretID: o.GetReferencedSecretID(),
  1135. }
  1136. m.By = &v
  1137. case *SelectBy_ReferencedConfigID:
  1138. v := SelectBy_ReferencedConfigID{
  1139. ReferencedConfigID: o.GetReferencedConfigID(),
  1140. }
  1141. m.By = &v
  1142. case *SelectBy_Kind:
  1143. v := SelectBy_Kind{
  1144. Kind: o.GetKind(),
  1145. }
  1146. m.By = &v
  1147. }
  1148. }
  1149. }
  1150. func (m *WatchRequest) Copy() *WatchRequest {
  1151. if m == nil {
  1152. return nil
  1153. }
  1154. o := &WatchRequest{}
  1155. o.CopyFrom(m)
  1156. return o
  1157. }
  1158. func (m *WatchRequest) CopyFrom(src interface{}) {
  1159. o := src.(*WatchRequest)
  1160. *m = *o
  1161. if o.Entries != nil {
  1162. m.Entries = make([]*WatchRequest_WatchEntry, len(o.Entries))
  1163. for i := range m.Entries {
  1164. m.Entries[i] = &WatchRequest_WatchEntry{}
  1165. github_com_docker_swarmkit_api_deepcopy.Copy(m.Entries[i], o.Entries[i])
  1166. }
  1167. }
  1168. if o.ResumeFrom != nil {
  1169. m.ResumeFrom = &Version{}
  1170. github_com_docker_swarmkit_api_deepcopy.Copy(m.ResumeFrom, o.ResumeFrom)
  1171. }
  1172. }
  1173. func (m *WatchRequest_WatchEntry) Copy() *WatchRequest_WatchEntry {
  1174. if m == nil {
  1175. return nil
  1176. }
  1177. o := &WatchRequest_WatchEntry{}
  1178. o.CopyFrom(m)
  1179. return o
  1180. }
  1181. func (m *WatchRequest_WatchEntry) CopyFrom(src interface{}) {
  1182. o := src.(*WatchRequest_WatchEntry)
  1183. *m = *o
  1184. if o.Filters != nil {
  1185. m.Filters = make([]*SelectBy, len(o.Filters))
  1186. for i := range m.Filters {
  1187. m.Filters[i] = &SelectBy{}
  1188. github_com_docker_swarmkit_api_deepcopy.Copy(m.Filters[i], o.Filters[i])
  1189. }
  1190. }
  1191. }
  1192. func (m *WatchMessage) Copy() *WatchMessage {
  1193. if m == nil {
  1194. return nil
  1195. }
  1196. o := &WatchMessage{}
  1197. o.CopyFrom(m)
  1198. return o
  1199. }
  1200. func (m *WatchMessage) CopyFrom(src interface{}) {
  1201. o := src.(*WatchMessage)
  1202. *m = *o
  1203. if o.Events != nil {
  1204. m.Events = make([]*WatchMessage_Event, len(o.Events))
  1205. for i := range m.Events {
  1206. m.Events[i] = &WatchMessage_Event{}
  1207. github_com_docker_swarmkit_api_deepcopy.Copy(m.Events[i], o.Events[i])
  1208. }
  1209. }
  1210. if o.Version != nil {
  1211. m.Version = &Version{}
  1212. github_com_docker_swarmkit_api_deepcopy.Copy(m.Version, o.Version)
  1213. }
  1214. }
  1215. func (m *WatchMessage_Event) Copy() *WatchMessage_Event {
  1216. if m == nil {
  1217. return nil
  1218. }
  1219. o := &WatchMessage_Event{}
  1220. o.CopyFrom(m)
  1221. return o
  1222. }
  1223. func (m *WatchMessage_Event) CopyFrom(src interface{}) {
  1224. o := src.(*WatchMessage_Event)
  1225. *m = *o
  1226. if o.Object != nil {
  1227. m.Object = &Object{}
  1228. github_com_docker_swarmkit_api_deepcopy.Copy(m.Object, o.Object)
  1229. }
  1230. if o.OldObject != nil {
  1231. m.OldObject = &Object{}
  1232. github_com_docker_swarmkit_api_deepcopy.Copy(m.OldObject, o.OldObject)
  1233. }
  1234. }
  1235. // Reference imports to suppress errors if they are not otherwise used.
  1236. var _ context.Context
  1237. var _ grpc.ClientConn
  1238. // This is a compile-time assertion to ensure that this generated file
  1239. // is compatible with the grpc package it is being compiled against.
  1240. const _ = grpc.SupportPackageIsVersion4
  1241. // Client API for Watch service
  1242. type WatchClient interface {
  1243. // Watch starts a stream that returns any changes to objects that match
  1244. // the specified selectors. When the stream begins, it immediately sends
  1245. // an empty message back to the client. It is important to wait for
  1246. // this message before taking any actions that depend on an established
  1247. // stream of changes for consistency.
  1248. Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error)
  1249. }
  1250. type watchClient struct {
  1251. cc *grpc.ClientConn
  1252. }
  1253. func NewWatchClient(cc *grpc.ClientConn) WatchClient {
  1254. return &watchClient{cc}
  1255. }
  1256. func (c *watchClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error) {
  1257. stream, err := grpc.NewClientStream(ctx, &_Watch_serviceDesc.Streams[0], c.cc, "/docker.swarmkit.v1.Watch/Watch", opts...)
  1258. if err != nil {
  1259. return nil, err
  1260. }
  1261. x := &watchWatchClient{stream}
  1262. if err := x.ClientStream.SendMsg(in); err != nil {
  1263. return nil, err
  1264. }
  1265. if err := x.ClientStream.CloseSend(); err != nil {
  1266. return nil, err
  1267. }
  1268. return x, nil
  1269. }
  1270. type Watch_WatchClient interface {
  1271. Recv() (*WatchMessage, error)
  1272. grpc.ClientStream
  1273. }
  1274. type watchWatchClient struct {
  1275. grpc.ClientStream
  1276. }
  1277. func (x *watchWatchClient) Recv() (*WatchMessage, error) {
  1278. m := new(WatchMessage)
  1279. if err := x.ClientStream.RecvMsg(m); err != nil {
  1280. return nil, err
  1281. }
  1282. return m, nil
  1283. }
  1284. // Server API for Watch service
  1285. type WatchServer interface {
  1286. // Watch starts a stream that returns any changes to objects that match
  1287. // the specified selectors. When the stream begins, it immediately sends
  1288. // an empty message back to the client. It is important to wait for
  1289. // this message before taking any actions that depend on an established
  1290. // stream of changes for consistency.
  1291. Watch(*WatchRequest, Watch_WatchServer) error
  1292. }
  1293. func RegisterWatchServer(s *grpc.Server, srv WatchServer) {
  1294. s.RegisterService(&_Watch_serviceDesc, srv)
  1295. }
  1296. func _Watch_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
  1297. m := new(WatchRequest)
  1298. if err := stream.RecvMsg(m); err != nil {
  1299. return err
  1300. }
  1301. return srv.(WatchServer).Watch(m, &watchWatchServer{stream})
  1302. }
  1303. type Watch_WatchServer interface {
  1304. Send(*WatchMessage) error
  1305. grpc.ServerStream
  1306. }
  1307. type watchWatchServer struct {
  1308. grpc.ServerStream
  1309. }
  1310. func (x *watchWatchServer) Send(m *WatchMessage) error {
  1311. return x.ServerStream.SendMsg(m)
  1312. }
  1313. var _Watch_serviceDesc = grpc.ServiceDesc{
  1314. ServiceName: "docker.swarmkit.v1.Watch",
  1315. HandlerType: (*WatchServer)(nil),
  1316. Methods: []grpc.MethodDesc{},
  1317. Streams: []grpc.StreamDesc{
  1318. {
  1319. StreamName: "Watch",
  1320. Handler: _Watch_Watch_Handler,
  1321. ServerStreams: true,
  1322. },
  1323. },
  1324. Metadata: "watch.proto",
  1325. }
  1326. func (m *Object) Marshal() (dAtA []byte, err error) {
  1327. size := m.Size()
  1328. dAtA = make([]byte, size)
  1329. n, err := m.MarshalTo(dAtA)
  1330. if err != nil {
  1331. return nil, err
  1332. }
  1333. return dAtA[:n], nil
  1334. }
  1335. func (m *Object) MarshalTo(dAtA []byte) (int, error) {
  1336. var i int
  1337. _ = i
  1338. var l int
  1339. _ = l
  1340. if m.Object != nil {
  1341. nn1, err := m.Object.MarshalTo(dAtA[i:])
  1342. if err != nil {
  1343. return 0, err
  1344. }
  1345. i += nn1
  1346. }
  1347. return i, nil
  1348. }
  1349. func (m *Object_Node) MarshalTo(dAtA []byte) (int, error) {
  1350. i := 0
  1351. if m.Node != nil {
  1352. dAtA[i] = 0xa
  1353. i++
  1354. i = encodeVarintWatch(dAtA, i, uint64(m.Node.Size()))
  1355. n2, err := m.Node.MarshalTo(dAtA[i:])
  1356. if err != nil {
  1357. return 0, err
  1358. }
  1359. i += n2
  1360. }
  1361. return i, nil
  1362. }
  1363. func (m *Object_Service) MarshalTo(dAtA []byte) (int, error) {
  1364. i := 0
  1365. if m.Service != nil {
  1366. dAtA[i] = 0x12
  1367. i++
  1368. i = encodeVarintWatch(dAtA, i, uint64(m.Service.Size()))
  1369. n3, err := m.Service.MarshalTo(dAtA[i:])
  1370. if err != nil {
  1371. return 0, err
  1372. }
  1373. i += n3
  1374. }
  1375. return i, nil
  1376. }
  1377. func (m *Object_Network) MarshalTo(dAtA []byte) (int, error) {
  1378. i := 0
  1379. if m.Network != nil {
  1380. dAtA[i] = 0x1a
  1381. i++
  1382. i = encodeVarintWatch(dAtA, i, uint64(m.Network.Size()))
  1383. n4, err := m.Network.MarshalTo(dAtA[i:])
  1384. if err != nil {
  1385. return 0, err
  1386. }
  1387. i += n4
  1388. }
  1389. return i, nil
  1390. }
  1391. func (m *Object_Task) MarshalTo(dAtA []byte) (int, error) {
  1392. i := 0
  1393. if m.Task != nil {
  1394. dAtA[i] = 0x22
  1395. i++
  1396. i = encodeVarintWatch(dAtA, i, uint64(m.Task.Size()))
  1397. n5, err := m.Task.MarshalTo(dAtA[i:])
  1398. if err != nil {
  1399. return 0, err
  1400. }
  1401. i += n5
  1402. }
  1403. return i, nil
  1404. }
  1405. func (m *Object_Cluster) MarshalTo(dAtA []byte) (int, error) {
  1406. i := 0
  1407. if m.Cluster != nil {
  1408. dAtA[i] = 0x2a
  1409. i++
  1410. i = encodeVarintWatch(dAtA, i, uint64(m.Cluster.Size()))
  1411. n6, err := m.Cluster.MarshalTo(dAtA[i:])
  1412. if err != nil {
  1413. return 0, err
  1414. }
  1415. i += n6
  1416. }
  1417. return i, nil
  1418. }
  1419. func (m *Object_Secret) MarshalTo(dAtA []byte) (int, error) {
  1420. i := 0
  1421. if m.Secret != nil {
  1422. dAtA[i] = 0x32
  1423. i++
  1424. i = encodeVarintWatch(dAtA, i, uint64(m.Secret.Size()))
  1425. n7, err := m.Secret.MarshalTo(dAtA[i:])
  1426. if err != nil {
  1427. return 0, err
  1428. }
  1429. i += n7
  1430. }
  1431. return i, nil
  1432. }
  1433. func (m *Object_Resource) MarshalTo(dAtA []byte) (int, error) {
  1434. i := 0
  1435. if m.Resource != nil {
  1436. dAtA[i] = 0x3a
  1437. i++
  1438. i = encodeVarintWatch(dAtA, i, uint64(m.Resource.Size()))
  1439. n8, err := m.Resource.MarshalTo(dAtA[i:])
  1440. if err != nil {
  1441. return 0, err
  1442. }
  1443. i += n8
  1444. }
  1445. return i, nil
  1446. }
  1447. func (m *Object_Extension) MarshalTo(dAtA []byte) (int, error) {
  1448. i := 0
  1449. if m.Extension != nil {
  1450. dAtA[i] = 0x42
  1451. i++
  1452. i = encodeVarintWatch(dAtA, i, uint64(m.Extension.Size()))
  1453. n9, err := m.Extension.MarshalTo(dAtA[i:])
  1454. if err != nil {
  1455. return 0, err
  1456. }
  1457. i += n9
  1458. }
  1459. return i, nil
  1460. }
  1461. func (m *Object_Config) MarshalTo(dAtA []byte) (int, error) {
  1462. i := 0
  1463. if m.Config != nil {
  1464. dAtA[i] = 0x4a
  1465. i++
  1466. i = encodeVarintWatch(dAtA, i, uint64(m.Config.Size()))
  1467. n10, err := m.Config.MarshalTo(dAtA[i:])
  1468. if err != nil {
  1469. return 0, err
  1470. }
  1471. i += n10
  1472. }
  1473. return i, nil
  1474. }
  1475. func (m *SelectBySlot) Marshal() (dAtA []byte, err error) {
  1476. size := m.Size()
  1477. dAtA = make([]byte, size)
  1478. n, err := m.MarshalTo(dAtA)
  1479. if err != nil {
  1480. return nil, err
  1481. }
  1482. return dAtA[:n], nil
  1483. }
  1484. func (m *SelectBySlot) MarshalTo(dAtA []byte) (int, error) {
  1485. var i int
  1486. _ = i
  1487. var l int
  1488. _ = l
  1489. if len(m.ServiceID) > 0 {
  1490. dAtA[i] = 0xa
  1491. i++
  1492. i = encodeVarintWatch(dAtA, i, uint64(len(m.ServiceID)))
  1493. i += copy(dAtA[i:], m.ServiceID)
  1494. }
  1495. if m.Slot != 0 {
  1496. dAtA[i] = 0x10
  1497. i++
  1498. i = encodeVarintWatch(dAtA, i, uint64(m.Slot))
  1499. }
  1500. return i, nil
  1501. }
  1502. func (m *SelectByCustom) Marshal() (dAtA []byte, err error) {
  1503. size := m.Size()
  1504. dAtA = make([]byte, size)
  1505. n, err := m.MarshalTo(dAtA)
  1506. if err != nil {
  1507. return nil, err
  1508. }
  1509. return dAtA[:n], nil
  1510. }
  1511. func (m *SelectByCustom) MarshalTo(dAtA []byte) (int, error) {
  1512. var i int
  1513. _ = i
  1514. var l int
  1515. _ = l
  1516. if len(m.Kind) > 0 {
  1517. dAtA[i] = 0xa
  1518. i++
  1519. i = encodeVarintWatch(dAtA, i, uint64(len(m.Kind)))
  1520. i += copy(dAtA[i:], m.Kind)
  1521. }
  1522. if len(m.Index) > 0 {
  1523. dAtA[i] = 0x12
  1524. i++
  1525. i = encodeVarintWatch(dAtA, i, uint64(len(m.Index)))
  1526. i += copy(dAtA[i:], m.Index)
  1527. }
  1528. if len(m.Value) > 0 {
  1529. dAtA[i] = 0x1a
  1530. i++
  1531. i = encodeVarintWatch(dAtA, i, uint64(len(m.Value)))
  1532. i += copy(dAtA[i:], m.Value)
  1533. }
  1534. return i, nil
  1535. }
  1536. func (m *SelectBy) Marshal() (dAtA []byte, err error) {
  1537. size := m.Size()
  1538. dAtA = make([]byte, size)
  1539. n, err := m.MarshalTo(dAtA)
  1540. if err != nil {
  1541. return nil, err
  1542. }
  1543. return dAtA[:n], nil
  1544. }
  1545. func (m *SelectBy) MarshalTo(dAtA []byte) (int, error) {
  1546. var i int
  1547. _ = i
  1548. var l int
  1549. _ = l
  1550. if m.By != nil {
  1551. nn11, err := m.By.MarshalTo(dAtA[i:])
  1552. if err != nil {
  1553. return 0, err
  1554. }
  1555. i += nn11
  1556. }
  1557. return i, nil
  1558. }
  1559. func (m *SelectBy_ID) MarshalTo(dAtA []byte) (int, error) {
  1560. i := 0
  1561. dAtA[i] = 0xa
  1562. i++
  1563. i = encodeVarintWatch(dAtA, i, uint64(len(m.ID)))
  1564. i += copy(dAtA[i:], m.ID)
  1565. return i, nil
  1566. }
  1567. func (m *SelectBy_IDPrefix) MarshalTo(dAtA []byte) (int, error) {
  1568. i := 0
  1569. dAtA[i] = 0x12
  1570. i++
  1571. i = encodeVarintWatch(dAtA, i, uint64(len(m.IDPrefix)))
  1572. i += copy(dAtA[i:], m.IDPrefix)
  1573. return i, nil
  1574. }
  1575. func (m *SelectBy_Name) MarshalTo(dAtA []byte) (int, error) {
  1576. i := 0
  1577. dAtA[i] = 0x1a
  1578. i++
  1579. i = encodeVarintWatch(dAtA, i, uint64(len(m.Name)))
  1580. i += copy(dAtA[i:], m.Name)
  1581. return i, nil
  1582. }
  1583. func (m *SelectBy_NamePrefix) MarshalTo(dAtA []byte) (int, error) {
  1584. i := 0
  1585. dAtA[i] = 0x22
  1586. i++
  1587. i = encodeVarintWatch(dAtA, i, uint64(len(m.NamePrefix)))
  1588. i += copy(dAtA[i:], m.NamePrefix)
  1589. return i, nil
  1590. }
  1591. func (m *SelectBy_Custom) MarshalTo(dAtA []byte) (int, error) {
  1592. i := 0
  1593. if m.Custom != nil {
  1594. dAtA[i] = 0x2a
  1595. i++
  1596. i = encodeVarintWatch(dAtA, i, uint64(m.Custom.Size()))
  1597. n12, err := m.Custom.MarshalTo(dAtA[i:])
  1598. if err != nil {
  1599. return 0, err
  1600. }
  1601. i += n12
  1602. }
  1603. return i, nil
  1604. }
  1605. func (m *SelectBy_CustomPrefix) MarshalTo(dAtA []byte) (int, error) {
  1606. i := 0
  1607. if m.CustomPrefix != nil {
  1608. dAtA[i] = 0x32
  1609. i++
  1610. i = encodeVarintWatch(dAtA, i, uint64(m.CustomPrefix.Size()))
  1611. n13, err := m.CustomPrefix.MarshalTo(dAtA[i:])
  1612. if err != nil {
  1613. return 0, err
  1614. }
  1615. i += n13
  1616. }
  1617. return i, nil
  1618. }
  1619. func (m *SelectBy_ServiceID) MarshalTo(dAtA []byte) (int, error) {
  1620. i := 0
  1621. dAtA[i] = 0x3a
  1622. i++
  1623. i = encodeVarintWatch(dAtA, i, uint64(len(m.ServiceID)))
  1624. i += copy(dAtA[i:], m.ServiceID)
  1625. return i, nil
  1626. }
  1627. func (m *SelectBy_NodeID) MarshalTo(dAtA []byte) (int, error) {
  1628. i := 0
  1629. dAtA[i] = 0x42
  1630. i++
  1631. i = encodeVarintWatch(dAtA, i, uint64(len(m.NodeID)))
  1632. i += copy(dAtA[i:], m.NodeID)
  1633. return i, nil
  1634. }
  1635. func (m *SelectBy_Slot) MarshalTo(dAtA []byte) (int, error) {
  1636. i := 0
  1637. if m.Slot != nil {
  1638. dAtA[i] = 0x4a
  1639. i++
  1640. i = encodeVarintWatch(dAtA, i, uint64(m.Slot.Size()))
  1641. n14, err := m.Slot.MarshalTo(dAtA[i:])
  1642. if err != nil {
  1643. return 0, err
  1644. }
  1645. i += n14
  1646. }
  1647. return i, nil
  1648. }
  1649. func (m *SelectBy_DesiredState) MarshalTo(dAtA []byte) (int, error) {
  1650. i := 0
  1651. dAtA[i] = 0x50
  1652. i++
  1653. i = encodeVarintWatch(dAtA, i, uint64(m.DesiredState))
  1654. return i, nil
  1655. }
  1656. func (m *SelectBy_Role) MarshalTo(dAtA []byte) (int, error) {
  1657. i := 0
  1658. dAtA[i] = 0x58
  1659. i++
  1660. i = encodeVarintWatch(dAtA, i, uint64(m.Role))
  1661. return i, nil
  1662. }
  1663. func (m *SelectBy_Membership) MarshalTo(dAtA []byte) (int, error) {
  1664. i := 0
  1665. dAtA[i] = 0x60
  1666. i++
  1667. i = encodeVarintWatch(dAtA, i, uint64(m.Membership))
  1668. return i, nil
  1669. }
  1670. func (m *SelectBy_ReferencedNetworkID) MarshalTo(dAtA []byte) (int, error) {
  1671. i := 0
  1672. dAtA[i] = 0x6a
  1673. i++
  1674. i = encodeVarintWatch(dAtA, i, uint64(len(m.ReferencedNetworkID)))
  1675. i += copy(dAtA[i:], m.ReferencedNetworkID)
  1676. return i, nil
  1677. }
  1678. func (m *SelectBy_ReferencedSecretID) MarshalTo(dAtA []byte) (int, error) {
  1679. i := 0
  1680. dAtA[i] = 0x72
  1681. i++
  1682. i = encodeVarintWatch(dAtA, i, uint64(len(m.ReferencedSecretID)))
  1683. i += copy(dAtA[i:], m.ReferencedSecretID)
  1684. return i, nil
  1685. }
  1686. func (m *SelectBy_Kind) MarshalTo(dAtA []byte) (int, error) {
  1687. i := 0
  1688. dAtA[i] = 0x7a
  1689. i++
  1690. i = encodeVarintWatch(dAtA, i, uint64(len(m.Kind)))
  1691. i += copy(dAtA[i:], m.Kind)
  1692. return i, nil
  1693. }
  1694. func (m *SelectBy_ReferencedConfigID) MarshalTo(dAtA []byte) (int, error) {
  1695. i := 0
  1696. dAtA[i] = 0x82
  1697. i++
  1698. dAtA[i] = 0x1
  1699. i++
  1700. i = encodeVarintWatch(dAtA, i, uint64(len(m.ReferencedConfigID)))
  1701. i += copy(dAtA[i:], m.ReferencedConfigID)
  1702. return i, nil
  1703. }
  1704. func (m *WatchRequest) Marshal() (dAtA []byte, err error) {
  1705. size := m.Size()
  1706. dAtA = make([]byte, size)
  1707. n, err := m.MarshalTo(dAtA)
  1708. if err != nil {
  1709. return nil, err
  1710. }
  1711. return dAtA[:n], nil
  1712. }
  1713. func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error) {
  1714. var i int
  1715. _ = i
  1716. var l int
  1717. _ = l
  1718. if len(m.Entries) > 0 {
  1719. for _, msg := range m.Entries {
  1720. dAtA[i] = 0xa
  1721. i++
  1722. i = encodeVarintWatch(dAtA, i, uint64(msg.Size()))
  1723. n, err := msg.MarshalTo(dAtA[i:])
  1724. if err != nil {
  1725. return 0, err
  1726. }
  1727. i += n
  1728. }
  1729. }
  1730. if m.ResumeFrom != nil {
  1731. dAtA[i] = 0x12
  1732. i++
  1733. i = encodeVarintWatch(dAtA, i, uint64(m.ResumeFrom.Size()))
  1734. n15, err := m.ResumeFrom.MarshalTo(dAtA[i:])
  1735. if err != nil {
  1736. return 0, err
  1737. }
  1738. i += n15
  1739. }
  1740. if m.IncludeOldObject {
  1741. dAtA[i] = 0x18
  1742. i++
  1743. if m.IncludeOldObject {
  1744. dAtA[i] = 1
  1745. } else {
  1746. dAtA[i] = 0
  1747. }
  1748. i++
  1749. }
  1750. return i, nil
  1751. }
  1752. func (m *WatchRequest_WatchEntry) Marshal() (dAtA []byte, err error) {
  1753. size := m.Size()
  1754. dAtA = make([]byte, size)
  1755. n, err := m.MarshalTo(dAtA)
  1756. if err != nil {
  1757. return nil, err
  1758. }
  1759. return dAtA[:n], nil
  1760. }
  1761. func (m *WatchRequest_WatchEntry) MarshalTo(dAtA []byte) (int, error) {
  1762. var i int
  1763. _ = i
  1764. var l int
  1765. _ = l
  1766. if len(m.Kind) > 0 {
  1767. dAtA[i] = 0xa
  1768. i++
  1769. i = encodeVarintWatch(dAtA, i, uint64(len(m.Kind)))
  1770. i += copy(dAtA[i:], m.Kind)
  1771. }
  1772. if m.Action != 0 {
  1773. dAtA[i] = 0x10
  1774. i++
  1775. i = encodeVarintWatch(dAtA, i, uint64(m.Action))
  1776. }
  1777. if len(m.Filters) > 0 {
  1778. for _, msg := range m.Filters {
  1779. dAtA[i] = 0x1a
  1780. i++
  1781. i = encodeVarintWatch(dAtA, i, uint64(msg.Size()))
  1782. n, err := msg.MarshalTo(dAtA[i:])
  1783. if err != nil {
  1784. return 0, err
  1785. }
  1786. i += n
  1787. }
  1788. }
  1789. return i, nil
  1790. }
  1791. func (m *WatchMessage) Marshal() (dAtA []byte, err error) {
  1792. size := m.Size()
  1793. dAtA = make([]byte, size)
  1794. n, err := m.MarshalTo(dAtA)
  1795. if err != nil {
  1796. return nil, err
  1797. }
  1798. return dAtA[:n], nil
  1799. }
  1800. func (m *WatchMessage) MarshalTo(dAtA []byte) (int, error) {
  1801. var i int
  1802. _ = i
  1803. var l int
  1804. _ = l
  1805. if len(m.Events) > 0 {
  1806. for _, msg := range m.Events {
  1807. dAtA[i] = 0xa
  1808. i++
  1809. i = encodeVarintWatch(dAtA, i, uint64(msg.Size()))
  1810. n, err := msg.MarshalTo(dAtA[i:])
  1811. if err != nil {
  1812. return 0, err
  1813. }
  1814. i += n
  1815. }
  1816. }
  1817. if m.Version != nil {
  1818. dAtA[i] = 0x12
  1819. i++
  1820. i = encodeVarintWatch(dAtA, i, uint64(m.Version.Size()))
  1821. n16, err := m.Version.MarshalTo(dAtA[i:])
  1822. if err != nil {
  1823. return 0, err
  1824. }
  1825. i += n16
  1826. }
  1827. return i, nil
  1828. }
  1829. func (m *WatchMessage_Event) Marshal() (dAtA []byte, err error) {
  1830. size := m.Size()
  1831. dAtA = make([]byte, size)
  1832. n, err := m.MarshalTo(dAtA)
  1833. if err != nil {
  1834. return nil, err
  1835. }
  1836. return dAtA[:n], nil
  1837. }
  1838. func (m *WatchMessage_Event) MarshalTo(dAtA []byte) (int, error) {
  1839. var i int
  1840. _ = i
  1841. var l int
  1842. _ = l
  1843. if m.Action != 0 {
  1844. dAtA[i] = 0x8
  1845. i++
  1846. i = encodeVarintWatch(dAtA, i, uint64(m.Action))
  1847. }
  1848. if m.Object != nil {
  1849. dAtA[i] = 0x12
  1850. i++
  1851. i = encodeVarintWatch(dAtA, i, uint64(m.Object.Size()))
  1852. n17, err := m.Object.MarshalTo(dAtA[i:])
  1853. if err != nil {
  1854. return 0, err
  1855. }
  1856. i += n17
  1857. }
  1858. if m.OldObject != nil {
  1859. dAtA[i] = 0x1a
  1860. i++
  1861. i = encodeVarintWatch(dAtA, i, uint64(m.OldObject.Size()))
  1862. n18, err := m.OldObject.MarshalTo(dAtA[i:])
  1863. if err != nil {
  1864. return 0, err
  1865. }
  1866. i += n18
  1867. }
  1868. return i, nil
  1869. }
  1870. func encodeFixed64Watch(dAtA []byte, offset int, v uint64) int {
  1871. dAtA[offset] = uint8(v)
  1872. dAtA[offset+1] = uint8(v >> 8)
  1873. dAtA[offset+2] = uint8(v >> 16)
  1874. dAtA[offset+3] = uint8(v >> 24)
  1875. dAtA[offset+4] = uint8(v >> 32)
  1876. dAtA[offset+5] = uint8(v >> 40)
  1877. dAtA[offset+6] = uint8(v >> 48)
  1878. dAtA[offset+7] = uint8(v >> 56)
  1879. return offset + 8
  1880. }
  1881. func encodeFixed32Watch(dAtA []byte, offset int, v uint32) int {
  1882. dAtA[offset] = uint8(v)
  1883. dAtA[offset+1] = uint8(v >> 8)
  1884. dAtA[offset+2] = uint8(v >> 16)
  1885. dAtA[offset+3] = uint8(v >> 24)
  1886. return offset + 4
  1887. }
  1888. func encodeVarintWatch(dAtA []byte, offset int, v uint64) int {
  1889. for v >= 1<<7 {
  1890. dAtA[offset] = uint8(v&0x7f | 0x80)
  1891. v >>= 7
  1892. offset++
  1893. }
  1894. dAtA[offset] = uint8(v)
  1895. return offset + 1
  1896. }
  1897. type raftProxyWatchServer struct {
  1898. local WatchServer
  1899. connSelector raftselector.ConnProvider
  1900. localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
  1901. }
  1902. func NewRaftProxyWatchServer(local WatchServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) WatchServer {
  1903. redirectChecker := func(ctx context.Context) (context.Context, error) {
  1904. s, ok := transport.StreamFromContext(ctx)
  1905. if !ok {
  1906. return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
  1907. }
  1908. addr := s.ServerTransport().RemoteAddr().String()
  1909. md, ok := metadata.FromContext(ctx)
  1910. if ok && len(md["redirect"]) != 0 {
  1911. return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
  1912. }
  1913. if !ok {
  1914. md = metadata.New(map[string]string{})
  1915. }
  1916. md["redirect"] = append(md["redirect"], addr)
  1917. return metadata.NewContext(ctx, md), nil
  1918. }
  1919. remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
  1920. remoteMods = append(remoteMods, remoteCtxMod)
  1921. var localMods []func(context.Context) (context.Context, error)
  1922. if localCtxMod != nil {
  1923. localMods = []func(context.Context) (context.Context, error){localCtxMod}
  1924. }
  1925. return &raftProxyWatchServer{
  1926. local: local,
  1927. connSelector: connSelector,
  1928. localCtxMods: localMods,
  1929. remoteCtxMods: remoteMods,
  1930. }
  1931. }
  1932. func (p *raftProxyWatchServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
  1933. var err error
  1934. for _, mod := range ctxMods {
  1935. ctx, err = mod(ctx)
  1936. if err != nil {
  1937. return ctx, err
  1938. }
  1939. }
  1940. return ctx, nil
  1941. }
  1942. func (p *raftProxyWatchServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
  1943. ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
  1944. defer ticker.Stop()
  1945. for {
  1946. select {
  1947. case <-ticker.C:
  1948. conn, err := p.connSelector.LeaderConn(ctx)
  1949. if err != nil {
  1950. return nil, err
  1951. }
  1952. client := NewHealthClient(conn)
  1953. resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
  1954. if err != nil || resp.Status != HealthCheckResponse_SERVING {
  1955. continue
  1956. }
  1957. return conn, nil
  1958. case <-ctx.Done():
  1959. return nil, ctx.Err()
  1960. }
  1961. }
  1962. }
  1963. type Watch_WatchServerWrapper struct {
  1964. Watch_WatchServer
  1965. ctx context.Context
  1966. }
  1967. func (s Watch_WatchServerWrapper) Context() context.Context {
  1968. return s.ctx
  1969. }
  1970. func (p *raftProxyWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error {
  1971. ctx := stream.Context()
  1972. conn, err := p.connSelector.LeaderConn(ctx)
  1973. if err != nil {
  1974. if err == raftselector.ErrIsLeader {
  1975. ctx, err = p.runCtxMods(ctx, p.localCtxMods)
  1976. if err != nil {
  1977. return err
  1978. }
  1979. streamWrapper := Watch_WatchServerWrapper{
  1980. Watch_WatchServer: stream,
  1981. ctx: ctx,
  1982. }
  1983. return p.local.Watch(r, streamWrapper)
  1984. }
  1985. return err
  1986. }
  1987. ctx, err = p.runCtxMods(ctx, p.remoteCtxMods)
  1988. if err != nil {
  1989. return err
  1990. }
  1991. clientStream, err := NewWatchClient(conn).Watch(ctx, r)
  1992. if err != nil {
  1993. return err
  1994. }
  1995. for {
  1996. msg, err := clientStream.Recv()
  1997. if err == io.EOF {
  1998. break
  1999. }
  2000. if err != nil {
  2001. return err
  2002. }
  2003. if err := stream.Send(msg); err != nil {
  2004. return err
  2005. }
  2006. }
  2007. return nil
  2008. }
  2009. func (m *Object) Size() (n int) {
  2010. var l int
  2011. _ = l
  2012. if m.Object != nil {
  2013. n += m.Object.Size()
  2014. }
  2015. return n
  2016. }
  2017. func (m *Object_Node) Size() (n int) {
  2018. var l int
  2019. _ = l
  2020. if m.Node != nil {
  2021. l = m.Node.Size()
  2022. n += 1 + l + sovWatch(uint64(l))
  2023. }
  2024. return n
  2025. }
  2026. func (m *Object_Service) Size() (n int) {
  2027. var l int
  2028. _ = l
  2029. if m.Service != nil {
  2030. l = m.Service.Size()
  2031. n += 1 + l + sovWatch(uint64(l))
  2032. }
  2033. return n
  2034. }
  2035. func (m *Object_Network) Size() (n int) {
  2036. var l int
  2037. _ = l
  2038. if m.Network != nil {
  2039. l = m.Network.Size()
  2040. n += 1 + l + sovWatch(uint64(l))
  2041. }
  2042. return n
  2043. }
  2044. func (m *Object_Task) Size() (n int) {
  2045. var l int
  2046. _ = l
  2047. if m.Task != nil {
  2048. l = m.Task.Size()
  2049. n += 1 + l + sovWatch(uint64(l))
  2050. }
  2051. return n
  2052. }
  2053. func (m *Object_Cluster) Size() (n int) {
  2054. var l int
  2055. _ = l
  2056. if m.Cluster != nil {
  2057. l = m.Cluster.Size()
  2058. n += 1 + l + sovWatch(uint64(l))
  2059. }
  2060. return n
  2061. }
  2062. func (m *Object_Secret) Size() (n int) {
  2063. var l int
  2064. _ = l
  2065. if m.Secret != nil {
  2066. l = m.Secret.Size()
  2067. n += 1 + l + sovWatch(uint64(l))
  2068. }
  2069. return n
  2070. }
  2071. func (m *Object_Resource) Size() (n int) {
  2072. var l int
  2073. _ = l
  2074. if m.Resource != nil {
  2075. l = m.Resource.Size()
  2076. n += 1 + l + sovWatch(uint64(l))
  2077. }
  2078. return n
  2079. }
  2080. func (m *Object_Extension) Size() (n int) {
  2081. var l int
  2082. _ = l
  2083. if m.Extension != nil {
  2084. l = m.Extension.Size()
  2085. n += 1 + l + sovWatch(uint64(l))
  2086. }
  2087. return n
  2088. }
  2089. func (m *Object_Config) Size() (n int) {
  2090. var l int
  2091. _ = l
  2092. if m.Config != nil {
  2093. l = m.Config.Size()
  2094. n += 1 + l + sovWatch(uint64(l))
  2095. }
  2096. return n
  2097. }
  2098. func (m *SelectBySlot) Size() (n int) {
  2099. var l int
  2100. _ = l
  2101. l = len(m.ServiceID)
  2102. if l > 0 {
  2103. n += 1 + l + sovWatch(uint64(l))
  2104. }
  2105. if m.Slot != 0 {
  2106. n += 1 + sovWatch(uint64(m.Slot))
  2107. }
  2108. return n
  2109. }
  2110. func (m *SelectByCustom) Size() (n int) {
  2111. var l int
  2112. _ = l
  2113. l = len(m.Kind)
  2114. if l > 0 {
  2115. n += 1 + l + sovWatch(uint64(l))
  2116. }
  2117. l = len(m.Index)
  2118. if l > 0 {
  2119. n += 1 + l + sovWatch(uint64(l))
  2120. }
  2121. l = len(m.Value)
  2122. if l > 0 {
  2123. n += 1 + l + sovWatch(uint64(l))
  2124. }
  2125. return n
  2126. }
  2127. func (m *SelectBy) Size() (n int) {
  2128. var l int
  2129. _ = l
  2130. if m.By != nil {
  2131. n += m.By.Size()
  2132. }
  2133. return n
  2134. }
  2135. func (m *SelectBy_ID) Size() (n int) {
  2136. var l int
  2137. _ = l
  2138. l = len(m.ID)
  2139. n += 1 + l + sovWatch(uint64(l))
  2140. return n
  2141. }
  2142. func (m *SelectBy_IDPrefix) Size() (n int) {
  2143. var l int
  2144. _ = l
  2145. l = len(m.IDPrefix)
  2146. n += 1 + l + sovWatch(uint64(l))
  2147. return n
  2148. }
  2149. func (m *SelectBy_Name) Size() (n int) {
  2150. var l int
  2151. _ = l
  2152. l = len(m.Name)
  2153. n += 1 + l + sovWatch(uint64(l))
  2154. return n
  2155. }
  2156. func (m *SelectBy_NamePrefix) Size() (n int) {
  2157. var l int
  2158. _ = l
  2159. l = len(m.NamePrefix)
  2160. n += 1 + l + sovWatch(uint64(l))
  2161. return n
  2162. }
  2163. func (m *SelectBy_Custom) Size() (n int) {
  2164. var l int
  2165. _ = l
  2166. if m.Custom != nil {
  2167. l = m.Custom.Size()
  2168. n += 1 + l + sovWatch(uint64(l))
  2169. }
  2170. return n
  2171. }
  2172. func (m *SelectBy_CustomPrefix) Size() (n int) {
  2173. var l int
  2174. _ = l
  2175. if m.CustomPrefix != nil {
  2176. l = m.CustomPrefix.Size()
  2177. n += 1 + l + sovWatch(uint64(l))
  2178. }
  2179. return n
  2180. }
  2181. func (m *SelectBy_ServiceID) Size() (n int) {
  2182. var l int
  2183. _ = l
  2184. l = len(m.ServiceID)
  2185. n += 1 + l + sovWatch(uint64(l))
  2186. return n
  2187. }
  2188. func (m *SelectBy_NodeID) Size() (n int) {
  2189. var l int
  2190. _ = l
  2191. l = len(m.NodeID)
  2192. n += 1 + l + sovWatch(uint64(l))
  2193. return n
  2194. }
  2195. func (m *SelectBy_Slot) Size() (n int) {
  2196. var l int
  2197. _ = l
  2198. if m.Slot != nil {
  2199. l = m.Slot.Size()
  2200. n += 1 + l + sovWatch(uint64(l))
  2201. }
  2202. return n
  2203. }
  2204. func (m *SelectBy_DesiredState) Size() (n int) {
  2205. var l int
  2206. _ = l
  2207. n += 1 + sovWatch(uint64(m.DesiredState))
  2208. return n
  2209. }
  2210. func (m *SelectBy_Role) Size() (n int) {
  2211. var l int
  2212. _ = l
  2213. n += 1 + sovWatch(uint64(m.Role))
  2214. return n
  2215. }
  2216. func (m *SelectBy_Membership) Size() (n int) {
  2217. var l int
  2218. _ = l
  2219. n += 1 + sovWatch(uint64(m.Membership))
  2220. return n
  2221. }
  2222. func (m *SelectBy_ReferencedNetworkID) Size() (n int) {
  2223. var l int
  2224. _ = l
  2225. l = len(m.ReferencedNetworkID)
  2226. n += 1 + l + sovWatch(uint64(l))
  2227. return n
  2228. }
  2229. func (m *SelectBy_ReferencedSecretID) Size() (n int) {
  2230. var l int
  2231. _ = l
  2232. l = len(m.ReferencedSecretID)
  2233. n += 1 + l + sovWatch(uint64(l))
  2234. return n
  2235. }
  2236. func (m *SelectBy_Kind) Size() (n int) {
  2237. var l int
  2238. _ = l
  2239. l = len(m.Kind)
  2240. n += 1 + l + sovWatch(uint64(l))
  2241. return n
  2242. }
  2243. func (m *SelectBy_ReferencedConfigID) Size() (n int) {
  2244. var l int
  2245. _ = l
  2246. l = len(m.ReferencedConfigID)
  2247. n += 2 + l + sovWatch(uint64(l))
  2248. return n
  2249. }
  2250. func (m *WatchRequest) Size() (n int) {
  2251. var l int
  2252. _ = l
  2253. if len(m.Entries) > 0 {
  2254. for _, e := range m.Entries {
  2255. l = e.Size()
  2256. n += 1 + l + sovWatch(uint64(l))
  2257. }
  2258. }
  2259. if m.ResumeFrom != nil {
  2260. l = m.ResumeFrom.Size()
  2261. n += 1 + l + sovWatch(uint64(l))
  2262. }
  2263. if m.IncludeOldObject {
  2264. n += 2
  2265. }
  2266. return n
  2267. }
  2268. func (m *WatchRequest_WatchEntry) Size() (n int) {
  2269. var l int
  2270. _ = l
  2271. l = len(m.Kind)
  2272. if l > 0 {
  2273. n += 1 + l + sovWatch(uint64(l))
  2274. }
  2275. if m.Action != 0 {
  2276. n += 1 + sovWatch(uint64(m.Action))
  2277. }
  2278. if len(m.Filters) > 0 {
  2279. for _, e := range m.Filters {
  2280. l = e.Size()
  2281. n += 1 + l + sovWatch(uint64(l))
  2282. }
  2283. }
  2284. return n
  2285. }
  2286. func (m *WatchMessage) Size() (n int) {
  2287. var l int
  2288. _ = l
  2289. if len(m.Events) > 0 {
  2290. for _, e := range m.Events {
  2291. l = e.Size()
  2292. n += 1 + l + sovWatch(uint64(l))
  2293. }
  2294. }
  2295. if m.Version != nil {
  2296. l = m.Version.Size()
  2297. n += 1 + l + sovWatch(uint64(l))
  2298. }
  2299. return n
  2300. }
  2301. func (m *WatchMessage_Event) Size() (n int) {
  2302. var l int
  2303. _ = l
  2304. if m.Action != 0 {
  2305. n += 1 + sovWatch(uint64(m.Action))
  2306. }
  2307. if m.Object != nil {
  2308. l = m.Object.Size()
  2309. n += 1 + l + sovWatch(uint64(l))
  2310. }
  2311. if m.OldObject != nil {
  2312. l = m.OldObject.Size()
  2313. n += 1 + l + sovWatch(uint64(l))
  2314. }
  2315. return n
  2316. }
  2317. func sovWatch(x uint64) (n int) {
  2318. for {
  2319. n++
  2320. x >>= 7
  2321. if x == 0 {
  2322. break
  2323. }
  2324. }
  2325. return n
  2326. }
  2327. func sozWatch(x uint64) (n int) {
  2328. return sovWatch(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2329. }
  2330. func (this *Object) String() string {
  2331. if this == nil {
  2332. return "nil"
  2333. }
  2334. s := strings.Join([]string{`&Object{`,
  2335. `Object:` + fmt.Sprintf("%v", this.Object) + `,`,
  2336. `}`,
  2337. }, "")
  2338. return s
  2339. }
  2340. func (this *Object_Node) String() string {
  2341. if this == nil {
  2342. return "nil"
  2343. }
  2344. s := strings.Join([]string{`&Object_Node{`,
  2345. `Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "Node", "Node", 1) + `,`,
  2346. `}`,
  2347. }, "")
  2348. return s
  2349. }
  2350. func (this *Object_Service) String() string {
  2351. if this == nil {
  2352. return "nil"
  2353. }
  2354. s := strings.Join([]string{`&Object_Service{`,
  2355. `Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "Service", "Service", 1) + `,`,
  2356. `}`,
  2357. }, "")
  2358. return s
  2359. }
  2360. func (this *Object_Network) String() string {
  2361. if this == nil {
  2362. return "nil"
  2363. }
  2364. s := strings.Join([]string{`&Object_Network{`,
  2365. `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`,
  2366. `}`,
  2367. }, "")
  2368. return s
  2369. }
  2370. func (this *Object_Task) String() string {
  2371. if this == nil {
  2372. return "nil"
  2373. }
  2374. s := strings.Join([]string{`&Object_Task{`,
  2375. `Task:` + strings.Replace(fmt.Sprintf("%v", this.Task), "Task", "Task", 1) + `,`,
  2376. `}`,
  2377. }, "")
  2378. return s
  2379. }
  2380. func (this *Object_Cluster) String() string {
  2381. if this == nil {
  2382. return "nil"
  2383. }
  2384. s := strings.Join([]string{`&Object_Cluster{`,
  2385. `Cluster:` + strings.Replace(fmt.Sprintf("%v", this.Cluster), "Cluster", "Cluster", 1) + `,`,
  2386. `}`,
  2387. }, "")
  2388. return s
  2389. }
  2390. func (this *Object_Secret) String() string {
  2391. if this == nil {
  2392. return "nil"
  2393. }
  2394. s := strings.Join([]string{`&Object_Secret{`,
  2395. `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`,
  2396. `}`,
  2397. }, "")
  2398. return s
  2399. }
  2400. func (this *Object_Resource) String() string {
  2401. if this == nil {
  2402. return "nil"
  2403. }
  2404. s := strings.Join([]string{`&Object_Resource{`,
  2405. `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "Resource", "Resource", 1) + `,`,
  2406. `}`,
  2407. }, "")
  2408. return s
  2409. }
  2410. func (this *Object_Extension) String() string {
  2411. if this == nil {
  2412. return "nil"
  2413. }
  2414. s := strings.Join([]string{`&Object_Extension{`,
  2415. `Extension:` + strings.Replace(fmt.Sprintf("%v", this.Extension), "Extension", "Extension", 1) + `,`,
  2416. `}`,
  2417. }, "")
  2418. return s
  2419. }
  2420. func (this *Object_Config) String() string {
  2421. if this == nil {
  2422. return "nil"
  2423. }
  2424. s := strings.Join([]string{`&Object_Config{`,
  2425. `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "Config", "Config", 1) + `,`,
  2426. `}`,
  2427. }, "")
  2428. return s
  2429. }
  2430. func (this *SelectBySlot) String() string {
  2431. if this == nil {
  2432. return "nil"
  2433. }
  2434. s := strings.Join([]string{`&SelectBySlot{`,
  2435. `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
  2436. `Slot:` + fmt.Sprintf("%v", this.Slot) + `,`,
  2437. `}`,
  2438. }, "")
  2439. return s
  2440. }
  2441. func (this *SelectByCustom) String() string {
  2442. if this == nil {
  2443. return "nil"
  2444. }
  2445. s := strings.Join([]string{`&SelectByCustom{`,
  2446. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  2447. `Index:` + fmt.Sprintf("%v", this.Index) + `,`,
  2448. `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
  2449. `}`,
  2450. }, "")
  2451. return s
  2452. }
  2453. func (this *SelectBy) String() string {
  2454. if this == nil {
  2455. return "nil"
  2456. }
  2457. s := strings.Join([]string{`&SelectBy{`,
  2458. `By:` + fmt.Sprintf("%v", this.By) + `,`,
  2459. `}`,
  2460. }, "")
  2461. return s
  2462. }
  2463. func (this *SelectBy_ID) String() string {
  2464. if this == nil {
  2465. return "nil"
  2466. }
  2467. s := strings.Join([]string{`&SelectBy_ID{`,
  2468. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  2469. `}`,
  2470. }, "")
  2471. return s
  2472. }
  2473. func (this *SelectBy_IDPrefix) String() string {
  2474. if this == nil {
  2475. return "nil"
  2476. }
  2477. s := strings.Join([]string{`&SelectBy_IDPrefix{`,
  2478. `IDPrefix:` + fmt.Sprintf("%v", this.IDPrefix) + `,`,
  2479. `}`,
  2480. }, "")
  2481. return s
  2482. }
  2483. func (this *SelectBy_Name) String() string {
  2484. if this == nil {
  2485. return "nil"
  2486. }
  2487. s := strings.Join([]string{`&SelectBy_Name{`,
  2488. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  2489. `}`,
  2490. }, "")
  2491. return s
  2492. }
  2493. func (this *SelectBy_NamePrefix) String() string {
  2494. if this == nil {
  2495. return "nil"
  2496. }
  2497. s := strings.Join([]string{`&SelectBy_NamePrefix{`,
  2498. `NamePrefix:` + fmt.Sprintf("%v", this.NamePrefix) + `,`,
  2499. `}`,
  2500. }, "")
  2501. return s
  2502. }
  2503. func (this *SelectBy_Custom) String() string {
  2504. if this == nil {
  2505. return "nil"
  2506. }
  2507. s := strings.Join([]string{`&SelectBy_Custom{`,
  2508. `Custom:` + strings.Replace(fmt.Sprintf("%v", this.Custom), "SelectByCustom", "SelectByCustom", 1) + `,`,
  2509. `}`,
  2510. }, "")
  2511. return s
  2512. }
  2513. func (this *SelectBy_CustomPrefix) String() string {
  2514. if this == nil {
  2515. return "nil"
  2516. }
  2517. s := strings.Join([]string{`&SelectBy_CustomPrefix{`,
  2518. `CustomPrefix:` + strings.Replace(fmt.Sprintf("%v", this.CustomPrefix), "SelectByCustom", "SelectByCustom", 1) + `,`,
  2519. `}`,
  2520. }, "")
  2521. return s
  2522. }
  2523. func (this *SelectBy_ServiceID) String() string {
  2524. if this == nil {
  2525. return "nil"
  2526. }
  2527. s := strings.Join([]string{`&SelectBy_ServiceID{`,
  2528. `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
  2529. `}`,
  2530. }, "")
  2531. return s
  2532. }
  2533. func (this *SelectBy_NodeID) String() string {
  2534. if this == nil {
  2535. return "nil"
  2536. }
  2537. s := strings.Join([]string{`&SelectBy_NodeID{`,
  2538. `NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
  2539. `}`,
  2540. }, "")
  2541. return s
  2542. }
  2543. func (this *SelectBy_Slot) String() string {
  2544. if this == nil {
  2545. return "nil"
  2546. }
  2547. s := strings.Join([]string{`&SelectBy_Slot{`,
  2548. `Slot:` + strings.Replace(fmt.Sprintf("%v", this.Slot), "SelectBySlot", "SelectBySlot", 1) + `,`,
  2549. `}`,
  2550. }, "")
  2551. return s
  2552. }
  2553. func (this *SelectBy_DesiredState) String() string {
  2554. if this == nil {
  2555. return "nil"
  2556. }
  2557. s := strings.Join([]string{`&SelectBy_DesiredState{`,
  2558. `DesiredState:` + fmt.Sprintf("%v", this.DesiredState) + `,`,
  2559. `}`,
  2560. }, "")
  2561. return s
  2562. }
  2563. func (this *SelectBy_Role) String() string {
  2564. if this == nil {
  2565. return "nil"
  2566. }
  2567. s := strings.Join([]string{`&SelectBy_Role{`,
  2568. `Role:` + fmt.Sprintf("%v", this.Role) + `,`,
  2569. `}`,
  2570. }, "")
  2571. return s
  2572. }
  2573. func (this *SelectBy_Membership) String() string {
  2574. if this == nil {
  2575. return "nil"
  2576. }
  2577. s := strings.Join([]string{`&SelectBy_Membership{`,
  2578. `Membership:` + fmt.Sprintf("%v", this.Membership) + `,`,
  2579. `}`,
  2580. }, "")
  2581. return s
  2582. }
  2583. func (this *SelectBy_ReferencedNetworkID) String() string {
  2584. if this == nil {
  2585. return "nil"
  2586. }
  2587. s := strings.Join([]string{`&SelectBy_ReferencedNetworkID{`,
  2588. `ReferencedNetworkID:` + fmt.Sprintf("%v", this.ReferencedNetworkID) + `,`,
  2589. `}`,
  2590. }, "")
  2591. return s
  2592. }
  2593. func (this *SelectBy_ReferencedSecretID) String() string {
  2594. if this == nil {
  2595. return "nil"
  2596. }
  2597. s := strings.Join([]string{`&SelectBy_ReferencedSecretID{`,
  2598. `ReferencedSecretID:` + fmt.Sprintf("%v", this.ReferencedSecretID) + `,`,
  2599. `}`,
  2600. }, "")
  2601. return s
  2602. }
  2603. func (this *SelectBy_Kind) String() string {
  2604. if this == nil {
  2605. return "nil"
  2606. }
  2607. s := strings.Join([]string{`&SelectBy_Kind{`,
  2608. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  2609. `}`,
  2610. }, "")
  2611. return s
  2612. }
  2613. func (this *SelectBy_ReferencedConfigID) String() string {
  2614. if this == nil {
  2615. return "nil"
  2616. }
  2617. s := strings.Join([]string{`&SelectBy_ReferencedConfigID{`,
  2618. `ReferencedConfigID:` + fmt.Sprintf("%v", this.ReferencedConfigID) + `,`,
  2619. `}`,
  2620. }, "")
  2621. return s
  2622. }
  2623. func (this *WatchRequest) String() string {
  2624. if this == nil {
  2625. return "nil"
  2626. }
  2627. s := strings.Join([]string{`&WatchRequest{`,
  2628. `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "WatchRequest_WatchEntry", "WatchRequest_WatchEntry", 1) + `,`,
  2629. `ResumeFrom:` + strings.Replace(fmt.Sprintf("%v", this.ResumeFrom), "Version", "Version", 1) + `,`,
  2630. `IncludeOldObject:` + fmt.Sprintf("%v", this.IncludeOldObject) + `,`,
  2631. `}`,
  2632. }, "")
  2633. return s
  2634. }
  2635. func (this *WatchRequest_WatchEntry) String() string {
  2636. if this == nil {
  2637. return "nil"
  2638. }
  2639. s := strings.Join([]string{`&WatchRequest_WatchEntry{`,
  2640. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  2641. `Action:` + fmt.Sprintf("%v", this.Action) + `,`,
  2642. `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "SelectBy", "SelectBy", 1) + `,`,
  2643. `}`,
  2644. }, "")
  2645. return s
  2646. }
  2647. func (this *WatchMessage) String() string {
  2648. if this == nil {
  2649. return "nil"
  2650. }
  2651. s := strings.Join([]string{`&WatchMessage{`,
  2652. `Events:` + strings.Replace(fmt.Sprintf("%v", this.Events), "WatchMessage_Event", "WatchMessage_Event", 1) + `,`,
  2653. `Version:` + strings.Replace(fmt.Sprintf("%v", this.Version), "Version", "Version", 1) + `,`,
  2654. `}`,
  2655. }, "")
  2656. return s
  2657. }
  2658. func (this *WatchMessage_Event) String() string {
  2659. if this == nil {
  2660. return "nil"
  2661. }
  2662. s := strings.Join([]string{`&WatchMessage_Event{`,
  2663. `Action:` + fmt.Sprintf("%v", this.Action) + `,`,
  2664. `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "Object", "Object", 1) + `,`,
  2665. `OldObject:` + strings.Replace(fmt.Sprintf("%v", this.OldObject), "Object", "Object", 1) + `,`,
  2666. `}`,
  2667. }, "")
  2668. return s
  2669. }
  2670. func valueToStringWatch(v interface{}) string {
  2671. rv := reflect.ValueOf(v)
  2672. if rv.IsNil() {
  2673. return "nil"
  2674. }
  2675. pv := reflect.Indirect(rv).Interface()
  2676. return fmt.Sprintf("*%v", pv)
  2677. }
  2678. func (m *Object) Unmarshal(dAtA []byte) error {
  2679. l := len(dAtA)
  2680. iNdEx := 0
  2681. for iNdEx < l {
  2682. preIndex := iNdEx
  2683. var wire uint64
  2684. for shift := uint(0); ; shift += 7 {
  2685. if shift >= 64 {
  2686. return ErrIntOverflowWatch
  2687. }
  2688. if iNdEx >= l {
  2689. return io.ErrUnexpectedEOF
  2690. }
  2691. b := dAtA[iNdEx]
  2692. iNdEx++
  2693. wire |= (uint64(b) & 0x7F) << shift
  2694. if b < 0x80 {
  2695. break
  2696. }
  2697. }
  2698. fieldNum := int32(wire >> 3)
  2699. wireType := int(wire & 0x7)
  2700. if wireType == 4 {
  2701. return fmt.Errorf("proto: Object: wiretype end group for non-group")
  2702. }
  2703. if fieldNum <= 0 {
  2704. return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire)
  2705. }
  2706. switch fieldNum {
  2707. case 1:
  2708. if wireType != 2 {
  2709. return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
  2710. }
  2711. var msglen int
  2712. for shift := uint(0); ; shift += 7 {
  2713. if shift >= 64 {
  2714. return ErrIntOverflowWatch
  2715. }
  2716. if iNdEx >= l {
  2717. return io.ErrUnexpectedEOF
  2718. }
  2719. b := dAtA[iNdEx]
  2720. iNdEx++
  2721. msglen |= (int(b) & 0x7F) << shift
  2722. if b < 0x80 {
  2723. break
  2724. }
  2725. }
  2726. if msglen < 0 {
  2727. return ErrInvalidLengthWatch
  2728. }
  2729. postIndex := iNdEx + msglen
  2730. if postIndex > l {
  2731. return io.ErrUnexpectedEOF
  2732. }
  2733. v := &Node{}
  2734. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2735. return err
  2736. }
  2737. m.Object = &Object_Node{v}
  2738. iNdEx = postIndex
  2739. case 2:
  2740. if wireType != 2 {
  2741. return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
  2742. }
  2743. var msglen int
  2744. for shift := uint(0); ; shift += 7 {
  2745. if shift >= 64 {
  2746. return ErrIntOverflowWatch
  2747. }
  2748. if iNdEx >= l {
  2749. return io.ErrUnexpectedEOF
  2750. }
  2751. b := dAtA[iNdEx]
  2752. iNdEx++
  2753. msglen |= (int(b) & 0x7F) << shift
  2754. if b < 0x80 {
  2755. break
  2756. }
  2757. }
  2758. if msglen < 0 {
  2759. return ErrInvalidLengthWatch
  2760. }
  2761. postIndex := iNdEx + msglen
  2762. if postIndex > l {
  2763. return io.ErrUnexpectedEOF
  2764. }
  2765. v := &Service{}
  2766. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2767. return err
  2768. }
  2769. m.Object = &Object_Service{v}
  2770. iNdEx = postIndex
  2771. case 3:
  2772. if wireType != 2 {
  2773. return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
  2774. }
  2775. var msglen int
  2776. for shift := uint(0); ; shift += 7 {
  2777. if shift >= 64 {
  2778. return ErrIntOverflowWatch
  2779. }
  2780. if iNdEx >= l {
  2781. return io.ErrUnexpectedEOF
  2782. }
  2783. b := dAtA[iNdEx]
  2784. iNdEx++
  2785. msglen |= (int(b) & 0x7F) << shift
  2786. if b < 0x80 {
  2787. break
  2788. }
  2789. }
  2790. if msglen < 0 {
  2791. return ErrInvalidLengthWatch
  2792. }
  2793. postIndex := iNdEx + msglen
  2794. if postIndex > l {
  2795. return io.ErrUnexpectedEOF
  2796. }
  2797. v := &Network{}
  2798. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2799. return err
  2800. }
  2801. m.Object = &Object_Network{v}
  2802. iNdEx = postIndex
  2803. case 4:
  2804. if wireType != 2 {
  2805. return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
  2806. }
  2807. var msglen int
  2808. for shift := uint(0); ; shift += 7 {
  2809. if shift >= 64 {
  2810. return ErrIntOverflowWatch
  2811. }
  2812. if iNdEx >= l {
  2813. return io.ErrUnexpectedEOF
  2814. }
  2815. b := dAtA[iNdEx]
  2816. iNdEx++
  2817. msglen |= (int(b) & 0x7F) << shift
  2818. if b < 0x80 {
  2819. break
  2820. }
  2821. }
  2822. if msglen < 0 {
  2823. return ErrInvalidLengthWatch
  2824. }
  2825. postIndex := iNdEx + msglen
  2826. if postIndex > l {
  2827. return io.ErrUnexpectedEOF
  2828. }
  2829. v := &Task{}
  2830. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2831. return err
  2832. }
  2833. m.Object = &Object_Task{v}
  2834. iNdEx = postIndex
  2835. case 5:
  2836. if wireType != 2 {
  2837. return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
  2838. }
  2839. var msglen int
  2840. for shift := uint(0); ; shift += 7 {
  2841. if shift >= 64 {
  2842. return ErrIntOverflowWatch
  2843. }
  2844. if iNdEx >= l {
  2845. return io.ErrUnexpectedEOF
  2846. }
  2847. b := dAtA[iNdEx]
  2848. iNdEx++
  2849. msglen |= (int(b) & 0x7F) << shift
  2850. if b < 0x80 {
  2851. break
  2852. }
  2853. }
  2854. if msglen < 0 {
  2855. return ErrInvalidLengthWatch
  2856. }
  2857. postIndex := iNdEx + msglen
  2858. if postIndex > l {
  2859. return io.ErrUnexpectedEOF
  2860. }
  2861. v := &Cluster{}
  2862. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2863. return err
  2864. }
  2865. m.Object = &Object_Cluster{v}
  2866. iNdEx = postIndex
  2867. case 6:
  2868. if wireType != 2 {
  2869. return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
  2870. }
  2871. var msglen int
  2872. for shift := uint(0); ; shift += 7 {
  2873. if shift >= 64 {
  2874. return ErrIntOverflowWatch
  2875. }
  2876. if iNdEx >= l {
  2877. return io.ErrUnexpectedEOF
  2878. }
  2879. b := dAtA[iNdEx]
  2880. iNdEx++
  2881. msglen |= (int(b) & 0x7F) << shift
  2882. if b < 0x80 {
  2883. break
  2884. }
  2885. }
  2886. if msglen < 0 {
  2887. return ErrInvalidLengthWatch
  2888. }
  2889. postIndex := iNdEx + msglen
  2890. if postIndex > l {
  2891. return io.ErrUnexpectedEOF
  2892. }
  2893. v := &Secret{}
  2894. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2895. return err
  2896. }
  2897. m.Object = &Object_Secret{v}
  2898. iNdEx = postIndex
  2899. case 7:
  2900. if wireType != 2 {
  2901. return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
  2902. }
  2903. var msglen int
  2904. for shift := uint(0); ; shift += 7 {
  2905. if shift >= 64 {
  2906. return ErrIntOverflowWatch
  2907. }
  2908. if iNdEx >= l {
  2909. return io.ErrUnexpectedEOF
  2910. }
  2911. b := dAtA[iNdEx]
  2912. iNdEx++
  2913. msglen |= (int(b) & 0x7F) << shift
  2914. if b < 0x80 {
  2915. break
  2916. }
  2917. }
  2918. if msglen < 0 {
  2919. return ErrInvalidLengthWatch
  2920. }
  2921. postIndex := iNdEx + msglen
  2922. if postIndex > l {
  2923. return io.ErrUnexpectedEOF
  2924. }
  2925. v := &Resource{}
  2926. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2927. return err
  2928. }
  2929. m.Object = &Object_Resource{v}
  2930. iNdEx = postIndex
  2931. case 8:
  2932. if wireType != 2 {
  2933. return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType)
  2934. }
  2935. var msglen int
  2936. for shift := uint(0); ; shift += 7 {
  2937. if shift >= 64 {
  2938. return ErrIntOverflowWatch
  2939. }
  2940. if iNdEx >= l {
  2941. return io.ErrUnexpectedEOF
  2942. }
  2943. b := dAtA[iNdEx]
  2944. iNdEx++
  2945. msglen |= (int(b) & 0x7F) << shift
  2946. if b < 0x80 {
  2947. break
  2948. }
  2949. }
  2950. if msglen < 0 {
  2951. return ErrInvalidLengthWatch
  2952. }
  2953. postIndex := iNdEx + msglen
  2954. if postIndex > l {
  2955. return io.ErrUnexpectedEOF
  2956. }
  2957. v := &Extension{}
  2958. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2959. return err
  2960. }
  2961. m.Object = &Object_Extension{v}
  2962. iNdEx = postIndex
  2963. case 9:
  2964. if wireType != 2 {
  2965. return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
  2966. }
  2967. var msglen int
  2968. for shift := uint(0); ; shift += 7 {
  2969. if shift >= 64 {
  2970. return ErrIntOverflowWatch
  2971. }
  2972. if iNdEx >= l {
  2973. return io.ErrUnexpectedEOF
  2974. }
  2975. b := dAtA[iNdEx]
  2976. iNdEx++
  2977. msglen |= (int(b) & 0x7F) << shift
  2978. if b < 0x80 {
  2979. break
  2980. }
  2981. }
  2982. if msglen < 0 {
  2983. return ErrInvalidLengthWatch
  2984. }
  2985. postIndex := iNdEx + msglen
  2986. if postIndex > l {
  2987. return io.ErrUnexpectedEOF
  2988. }
  2989. v := &Config{}
  2990. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2991. return err
  2992. }
  2993. m.Object = &Object_Config{v}
  2994. iNdEx = postIndex
  2995. default:
  2996. iNdEx = preIndex
  2997. skippy, err := skipWatch(dAtA[iNdEx:])
  2998. if err != nil {
  2999. return err
  3000. }
  3001. if skippy < 0 {
  3002. return ErrInvalidLengthWatch
  3003. }
  3004. if (iNdEx + skippy) > l {
  3005. return io.ErrUnexpectedEOF
  3006. }
  3007. iNdEx += skippy
  3008. }
  3009. }
  3010. if iNdEx > l {
  3011. return io.ErrUnexpectedEOF
  3012. }
  3013. return nil
  3014. }
  3015. func (m *SelectBySlot) Unmarshal(dAtA []byte) error {
  3016. l := len(dAtA)
  3017. iNdEx := 0
  3018. for iNdEx < l {
  3019. preIndex := iNdEx
  3020. var wire uint64
  3021. for shift := uint(0); ; shift += 7 {
  3022. if shift >= 64 {
  3023. return ErrIntOverflowWatch
  3024. }
  3025. if iNdEx >= l {
  3026. return io.ErrUnexpectedEOF
  3027. }
  3028. b := dAtA[iNdEx]
  3029. iNdEx++
  3030. wire |= (uint64(b) & 0x7F) << shift
  3031. if b < 0x80 {
  3032. break
  3033. }
  3034. }
  3035. fieldNum := int32(wire >> 3)
  3036. wireType := int(wire & 0x7)
  3037. if wireType == 4 {
  3038. return fmt.Errorf("proto: SelectBySlot: wiretype end group for non-group")
  3039. }
  3040. if fieldNum <= 0 {
  3041. return fmt.Errorf("proto: SelectBySlot: illegal tag %d (wire type %d)", fieldNum, wire)
  3042. }
  3043. switch fieldNum {
  3044. case 1:
  3045. if wireType != 2 {
  3046. return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
  3047. }
  3048. var stringLen uint64
  3049. for shift := uint(0); ; shift += 7 {
  3050. if shift >= 64 {
  3051. return ErrIntOverflowWatch
  3052. }
  3053. if iNdEx >= l {
  3054. return io.ErrUnexpectedEOF
  3055. }
  3056. b := dAtA[iNdEx]
  3057. iNdEx++
  3058. stringLen |= (uint64(b) & 0x7F) << shift
  3059. if b < 0x80 {
  3060. break
  3061. }
  3062. }
  3063. intStringLen := int(stringLen)
  3064. if intStringLen < 0 {
  3065. return ErrInvalidLengthWatch
  3066. }
  3067. postIndex := iNdEx + intStringLen
  3068. if postIndex > l {
  3069. return io.ErrUnexpectedEOF
  3070. }
  3071. m.ServiceID = string(dAtA[iNdEx:postIndex])
  3072. iNdEx = postIndex
  3073. case 2:
  3074. if wireType != 0 {
  3075. return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
  3076. }
  3077. m.Slot = 0
  3078. for shift := uint(0); ; shift += 7 {
  3079. if shift >= 64 {
  3080. return ErrIntOverflowWatch
  3081. }
  3082. if iNdEx >= l {
  3083. return io.ErrUnexpectedEOF
  3084. }
  3085. b := dAtA[iNdEx]
  3086. iNdEx++
  3087. m.Slot |= (uint64(b) & 0x7F) << shift
  3088. if b < 0x80 {
  3089. break
  3090. }
  3091. }
  3092. default:
  3093. iNdEx = preIndex
  3094. skippy, err := skipWatch(dAtA[iNdEx:])
  3095. if err != nil {
  3096. return err
  3097. }
  3098. if skippy < 0 {
  3099. return ErrInvalidLengthWatch
  3100. }
  3101. if (iNdEx + skippy) > l {
  3102. return io.ErrUnexpectedEOF
  3103. }
  3104. iNdEx += skippy
  3105. }
  3106. }
  3107. if iNdEx > l {
  3108. return io.ErrUnexpectedEOF
  3109. }
  3110. return nil
  3111. }
  3112. func (m *SelectByCustom) Unmarshal(dAtA []byte) error {
  3113. l := len(dAtA)
  3114. iNdEx := 0
  3115. for iNdEx < l {
  3116. preIndex := iNdEx
  3117. var wire uint64
  3118. for shift := uint(0); ; shift += 7 {
  3119. if shift >= 64 {
  3120. return ErrIntOverflowWatch
  3121. }
  3122. if iNdEx >= l {
  3123. return io.ErrUnexpectedEOF
  3124. }
  3125. b := dAtA[iNdEx]
  3126. iNdEx++
  3127. wire |= (uint64(b) & 0x7F) << shift
  3128. if b < 0x80 {
  3129. break
  3130. }
  3131. }
  3132. fieldNum := int32(wire >> 3)
  3133. wireType := int(wire & 0x7)
  3134. if wireType == 4 {
  3135. return fmt.Errorf("proto: SelectByCustom: wiretype end group for non-group")
  3136. }
  3137. if fieldNum <= 0 {
  3138. return fmt.Errorf("proto: SelectByCustom: illegal tag %d (wire type %d)", fieldNum, wire)
  3139. }
  3140. switch fieldNum {
  3141. case 1:
  3142. if wireType != 2 {
  3143. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  3144. }
  3145. var stringLen uint64
  3146. for shift := uint(0); ; shift += 7 {
  3147. if shift >= 64 {
  3148. return ErrIntOverflowWatch
  3149. }
  3150. if iNdEx >= l {
  3151. return io.ErrUnexpectedEOF
  3152. }
  3153. b := dAtA[iNdEx]
  3154. iNdEx++
  3155. stringLen |= (uint64(b) & 0x7F) << shift
  3156. if b < 0x80 {
  3157. break
  3158. }
  3159. }
  3160. intStringLen := int(stringLen)
  3161. if intStringLen < 0 {
  3162. return ErrInvalidLengthWatch
  3163. }
  3164. postIndex := iNdEx + intStringLen
  3165. if postIndex > l {
  3166. return io.ErrUnexpectedEOF
  3167. }
  3168. m.Kind = string(dAtA[iNdEx:postIndex])
  3169. iNdEx = postIndex
  3170. case 2:
  3171. if wireType != 2 {
  3172. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  3173. }
  3174. var stringLen uint64
  3175. for shift := uint(0); ; shift += 7 {
  3176. if shift >= 64 {
  3177. return ErrIntOverflowWatch
  3178. }
  3179. if iNdEx >= l {
  3180. return io.ErrUnexpectedEOF
  3181. }
  3182. b := dAtA[iNdEx]
  3183. iNdEx++
  3184. stringLen |= (uint64(b) & 0x7F) << shift
  3185. if b < 0x80 {
  3186. break
  3187. }
  3188. }
  3189. intStringLen := int(stringLen)
  3190. if intStringLen < 0 {
  3191. return ErrInvalidLengthWatch
  3192. }
  3193. postIndex := iNdEx + intStringLen
  3194. if postIndex > l {
  3195. return io.ErrUnexpectedEOF
  3196. }
  3197. m.Index = string(dAtA[iNdEx:postIndex])
  3198. iNdEx = postIndex
  3199. case 3:
  3200. if wireType != 2 {
  3201. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  3202. }
  3203. var stringLen uint64
  3204. for shift := uint(0); ; shift += 7 {
  3205. if shift >= 64 {
  3206. return ErrIntOverflowWatch
  3207. }
  3208. if iNdEx >= l {
  3209. return io.ErrUnexpectedEOF
  3210. }
  3211. b := dAtA[iNdEx]
  3212. iNdEx++
  3213. stringLen |= (uint64(b) & 0x7F) << shift
  3214. if b < 0x80 {
  3215. break
  3216. }
  3217. }
  3218. intStringLen := int(stringLen)
  3219. if intStringLen < 0 {
  3220. return ErrInvalidLengthWatch
  3221. }
  3222. postIndex := iNdEx + intStringLen
  3223. if postIndex > l {
  3224. return io.ErrUnexpectedEOF
  3225. }
  3226. m.Value = string(dAtA[iNdEx:postIndex])
  3227. iNdEx = postIndex
  3228. default:
  3229. iNdEx = preIndex
  3230. skippy, err := skipWatch(dAtA[iNdEx:])
  3231. if err != nil {
  3232. return err
  3233. }
  3234. if skippy < 0 {
  3235. return ErrInvalidLengthWatch
  3236. }
  3237. if (iNdEx + skippy) > l {
  3238. return io.ErrUnexpectedEOF
  3239. }
  3240. iNdEx += skippy
  3241. }
  3242. }
  3243. if iNdEx > l {
  3244. return io.ErrUnexpectedEOF
  3245. }
  3246. return nil
  3247. }
  3248. func (m *SelectBy) Unmarshal(dAtA []byte) error {
  3249. l := len(dAtA)
  3250. iNdEx := 0
  3251. for iNdEx < l {
  3252. preIndex := iNdEx
  3253. var wire uint64
  3254. for shift := uint(0); ; shift += 7 {
  3255. if shift >= 64 {
  3256. return ErrIntOverflowWatch
  3257. }
  3258. if iNdEx >= l {
  3259. return io.ErrUnexpectedEOF
  3260. }
  3261. b := dAtA[iNdEx]
  3262. iNdEx++
  3263. wire |= (uint64(b) & 0x7F) << shift
  3264. if b < 0x80 {
  3265. break
  3266. }
  3267. }
  3268. fieldNum := int32(wire >> 3)
  3269. wireType := int(wire & 0x7)
  3270. if wireType == 4 {
  3271. return fmt.Errorf("proto: SelectBy: wiretype end group for non-group")
  3272. }
  3273. if fieldNum <= 0 {
  3274. return fmt.Errorf("proto: SelectBy: illegal tag %d (wire type %d)", fieldNum, wire)
  3275. }
  3276. switch fieldNum {
  3277. case 1:
  3278. if wireType != 2 {
  3279. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3280. }
  3281. var stringLen uint64
  3282. for shift := uint(0); ; shift += 7 {
  3283. if shift >= 64 {
  3284. return ErrIntOverflowWatch
  3285. }
  3286. if iNdEx >= l {
  3287. return io.ErrUnexpectedEOF
  3288. }
  3289. b := dAtA[iNdEx]
  3290. iNdEx++
  3291. stringLen |= (uint64(b) & 0x7F) << shift
  3292. if b < 0x80 {
  3293. break
  3294. }
  3295. }
  3296. intStringLen := int(stringLen)
  3297. if intStringLen < 0 {
  3298. return ErrInvalidLengthWatch
  3299. }
  3300. postIndex := iNdEx + intStringLen
  3301. if postIndex > l {
  3302. return io.ErrUnexpectedEOF
  3303. }
  3304. m.By = &SelectBy_ID{string(dAtA[iNdEx:postIndex])}
  3305. iNdEx = postIndex
  3306. case 2:
  3307. if wireType != 2 {
  3308. return fmt.Errorf("proto: wrong wireType = %d for field IDPrefix", wireType)
  3309. }
  3310. var stringLen uint64
  3311. for shift := uint(0); ; shift += 7 {
  3312. if shift >= 64 {
  3313. return ErrIntOverflowWatch
  3314. }
  3315. if iNdEx >= l {
  3316. return io.ErrUnexpectedEOF
  3317. }
  3318. b := dAtA[iNdEx]
  3319. iNdEx++
  3320. stringLen |= (uint64(b) & 0x7F) << shift
  3321. if b < 0x80 {
  3322. break
  3323. }
  3324. }
  3325. intStringLen := int(stringLen)
  3326. if intStringLen < 0 {
  3327. return ErrInvalidLengthWatch
  3328. }
  3329. postIndex := iNdEx + intStringLen
  3330. if postIndex > l {
  3331. return io.ErrUnexpectedEOF
  3332. }
  3333. m.By = &SelectBy_IDPrefix{string(dAtA[iNdEx:postIndex])}
  3334. iNdEx = postIndex
  3335. case 3:
  3336. if wireType != 2 {
  3337. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3338. }
  3339. var stringLen uint64
  3340. for shift := uint(0); ; shift += 7 {
  3341. if shift >= 64 {
  3342. return ErrIntOverflowWatch
  3343. }
  3344. if iNdEx >= l {
  3345. return io.ErrUnexpectedEOF
  3346. }
  3347. b := dAtA[iNdEx]
  3348. iNdEx++
  3349. stringLen |= (uint64(b) & 0x7F) << shift
  3350. if b < 0x80 {
  3351. break
  3352. }
  3353. }
  3354. intStringLen := int(stringLen)
  3355. if intStringLen < 0 {
  3356. return ErrInvalidLengthWatch
  3357. }
  3358. postIndex := iNdEx + intStringLen
  3359. if postIndex > l {
  3360. return io.ErrUnexpectedEOF
  3361. }
  3362. m.By = &SelectBy_Name{string(dAtA[iNdEx:postIndex])}
  3363. iNdEx = postIndex
  3364. case 4:
  3365. if wireType != 2 {
  3366. return fmt.Errorf("proto: wrong wireType = %d for field NamePrefix", wireType)
  3367. }
  3368. var stringLen uint64
  3369. for shift := uint(0); ; shift += 7 {
  3370. if shift >= 64 {
  3371. return ErrIntOverflowWatch
  3372. }
  3373. if iNdEx >= l {
  3374. return io.ErrUnexpectedEOF
  3375. }
  3376. b := dAtA[iNdEx]
  3377. iNdEx++
  3378. stringLen |= (uint64(b) & 0x7F) << shift
  3379. if b < 0x80 {
  3380. break
  3381. }
  3382. }
  3383. intStringLen := int(stringLen)
  3384. if intStringLen < 0 {
  3385. return ErrInvalidLengthWatch
  3386. }
  3387. postIndex := iNdEx + intStringLen
  3388. if postIndex > l {
  3389. return io.ErrUnexpectedEOF
  3390. }
  3391. m.By = &SelectBy_NamePrefix{string(dAtA[iNdEx:postIndex])}
  3392. iNdEx = postIndex
  3393. case 5:
  3394. if wireType != 2 {
  3395. return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType)
  3396. }
  3397. var msglen int
  3398. for shift := uint(0); ; shift += 7 {
  3399. if shift >= 64 {
  3400. return ErrIntOverflowWatch
  3401. }
  3402. if iNdEx >= l {
  3403. return io.ErrUnexpectedEOF
  3404. }
  3405. b := dAtA[iNdEx]
  3406. iNdEx++
  3407. msglen |= (int(b) & 0x7F) << shift
  3408. if b < 0x80 {
  3409. break
  3410. }
  3411. }
  3412. if msglen < 0 {
  3413. return ErrInvalidLengthWatch
  3414. }
  3415. postIndex := iNdEx + msglen
  3416. if postIndex > l {
  3417. return io.ErrUnexpectedEOF
  3418. }
  3419. v := &SelectByCustom{}
  3420. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3421. return err
  3422. }
  3423. m.By = &SelectBy_Custom{v}
  3424. iNdEx = postIndex
  3425. case 6:
  3426. if wireType != 2 {
  3427. return fmt.Errorf("proto: wrong wireType = %d for field CustomPrefix", wireType)
  3428. }
  3429. var msglen int
  3430. for shift := uint(0); ; shift += 7 {
  3431. if shift >= 64 {
  3432. return ErrIntOverflowWatch
  3433. }
  3434. if iNdEx >= l {
  3435. return io.ErrUnexpectedEOF
  3436. }
  3437. b := dAtA[iNdEx]
  3438. iNdEx++
  3439. msglen |= (int(b) & 0x7F) << shift
  3440. if b < 0x80 {
  3441. break
  3442. }
  3443. }
  3444. if msglen < 0 {
  3445. return ErrInvalidLengthWatch
  3446. }
  3447. postIndex := iNdEx + msglen
  3448. if postIndex > l {
  3449. return io.ErrUnexpectedEOF
  3450. }
  3451. v := &SelectByCustom{}
  3452. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3453. return err
  3454. }
  3455. m.By = &SelectBy_CustomPrefix{v}
  3456. iNdEx = postIndex
  3457. case 7:
  3458. if wireType != 2 {
  3459. return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
  3460. }
  3461. var stringLen uint64
  3462. for shift := uint(0); ; shift += 7 {
  3463. if shift >= 64 {
  3464. return ErrIntOverflowWatch
  3465. }
  3466. if iNdEx >= l {
  3467. return io.ErrUnexpectedEOF
  3468. }
  3469. b := dAtA[iNdEx]
  3470. iNdEx++
  3471. stringLen |= (uint64(b) & 0x7F) << shift
  3472. if b < 0x80 {
  3473. break
  3474. }
  3475. }
  3476. intStringLen := int(stringLen)
  3477. if intStringLen < 0 {
  3478. return ErrInvalidLengthWatch
  3479. }
  3480. postIndex := iNdEx + intStringLen
  3481. if postIndex > l {
  3482. return io.ErrUnexpectedEOF
  3483. }
  3484. m.By = &SelectBy_ServiceID{string(dAtA[iNdEx:postIndex])}
  3485. iNdEx = postIndex
  3486. case 8:
  3487. if wireType != 2 {
  3488. return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
  3489. }
  3490. var stringLen uint64
  3491. for shift := uint(0); ; shift += 7 {
  3492. if shift >= 64 {
  3493. return ErrIntOverflowWatch
  3494. }
  3495. if iNdEx >= l {
  3496. return io.ErrUnexpectedEOF
  3497. }
  3498. b := dAtA[iNdEx]
  3499. iNdEx++
  3500. stringLen |= (uint64(b) & 0x7F) << shift
  3501. if b < 0x80 {
  3502. break
  3503. }
  3504. }
  3505. intStringLen := int(stringLen)
  3506. if intStringLen < 0 {
  3507. return ErrInvalidLengthWatch
  3508. }
  3509. postIndex := iNdEx + intStringLen
  3510. if postIndex > l {
  3511. return io.ErrUnexpectedEOF
  3512. }
  3513. m.By = &SelectBy_NodeID{string(dAtA[iNdEx:postIndex])}
  3514. iNdEx = postIndex
  3515. case 9:
  3516. if wireType != 2 {
  3517. return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
  3518. }
  3519. var msglen int
  3520. for shift := uint(0); ; shift += 7 {
  3521. if shift >= 64 {
  3522. return ErrIntOverflowWatch
  3523. }
  3524. if iNdEx >= l {
  3525. return io.ErrUnexpectedEOF
  3526. }
  3527. b := dAtA[iNdEx]
  3528. iNdEx++
  3529. msglen |= (int(b) & 0x7F) << shift
  3530. if b < 0x80 {
  3531. break
  3532. }
  3533. }
  3534. if msglen < 0 {
  3535. return ErrInvalidLengthWatch
  3536. }
  3537. postIndex := iNdEx + msglen
  3538. if postIndex > l {
  3539. return io.ErrUnexpectedEOF
  3540. }
  3541. v := &SelectBySlot{}
  3542. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3543. return err
  3544. }
  3545. m.By = &SelectBy_Slot{v}
  3546. iNdEx = postIndex
  3547. case 10:
  3548. if wireType != 0 {
  3549. return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType)
  3550. }
  3551. var v TaskState
  3552. for shift := uint(0); ; shift += 7 {
  3553. if shift >= 64 {
  3554. return ErrIntOverflowWatch
  3555. }
  3556. if iNdEx >= l {
  3557. return io.ErrUnexpectedEOF
  3558. }
  3559. b := dAtA[iNdEx]
  3560. iNdEx++
  3561. v |= (TaskState(b) & 0x7F) << shift
  3562. if b < 0x80 {
  3563. break
  3564. }
  3565. }
  3566. m.By = &SelectBy_DesiredState{v}
  3567. case 11:
  3568. if wireType != 0 {
  3569. return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
  3570. }
  3571. var v NodeRole
  3572. for shift := uint(0); ; shift += 7 {
  3573. if shift >= 64 {
  3574. return ErrIntOverflowWatch
  3575. }
  3576. if iNdEx >= l {
  3577. return io.ErrUnexpectedEOF
  3578. }
  3579. b := dAtA[iNdEx]
  3580. iNdEx++
  3581. v |= (NodeRole(b) & 0x7F) << shift
  3582. if b < 0x80 {
  3583. break
  3584. }
  3585. }
  3586. m.By = &SelectBy_Role{v}
  3587. case 12:
  3588. if wireType != 0 {
  3589. return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
  3590. }
  3591. var v NodeSpec_Membership
  3592. for shift := uint(0); ; shift += 7 {
  3593. if shift >= 64 {
  3594. return ErrIntOverflowWatch
  3595. }
  3596. if iNdEx >= l {
  3597. return io.ErrUnexpectedEOF
  3598. }
  3599. b := dAtA[iNdEx]
  3600. iNdEx++
  3601. v |= (NodeSpec_Membership(b) & 0x7F) << shift
  3602. if b < 0x80 {
  3603. break
  3604. }
  3605. }
  3606. m.By = &SelectBy_Membership{v}
  3607. case 13:
  3608. if wireType != 2 {
  3609. return fmt.Errorf("proto: wrong wireType = %d for field ReferencedNetworkID", wireType)
  3610. }
  3611. var stringLen uint64
  3612. for shift := uint(0); ; shift += 7 {
  3613. if shift >= 64 {
  3614. return ErrIntOverflowWatch
  3615. }
  3616. if iNdEx >= l {
  3617. return io.ErrUnexpectedEOF
  3618. }
  3619. b := dAtA[iNdEx]
  3620. iNdEx++
  3621. stringLen |= (uint64(b) & 0x7F) << shift
  3622. if b < 0x80 {
  3623. break
  3624. }
  3625. }
  3626. intStringLen := int(stringLen)
  3627. if intStringLen < 0 {
  3628. return ErrInvalidLengthWatch
  3629. }
  3630. postIndex := iNdEx + intStringLen
  3631. if postIndex > l {
  3632. return io.ErrUnexpectedEOF
  3633. }
  3634. m.By = &SelectBy_ReferencedNetworkID{string(dAtA[iNdEx:postIndex])}
  3635. iNdEx = postIndex
  3636. case 14:
  3637. if wireType != 2 {
  3638. return fmt.Errorf("proto: wrong wireType = %d for field ReferencedSecretID", wireType)
  3639. }
  3640. var stringLen uint64
  3641. for shift := uint(0); ; shift += 7 {
  3642. if shift >= 64 {
  3643. return ErrIntOverflowWatch
  3644. }
  3645. if iNdEx >= l {
  3646. return io.ErrUnexpectedEOF
  3647. }
  3648. b := dAtA[iNdEx]
  3649. iNdEx++
  3650. stringLen |= (uint64(b) & 0x7F) << shift
  3651. if b < 0x80 {
  3652. break
  3653. }
  3654. }
  3655. intStringLen := int(stringLen)
  3656. if intStringLen < 0 {
  3657. return ErrInvalidLengthWatch
  3658. }
  3659. postIndex := iNdEx + intStringLen
  3660. if postIndex > l {
  3661. return io.ErrUnexpectedEOF
  3662. }
  3663. m.By = &SelectBy_ReferencedSecretID{string(dAtA[iNdEx:postIndex])}
  3664. iNdEx = postIndex
  3665. case 15:
  3666. if wireType != 2 {
  3667. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  3668. }
  3669. var stringLen uint64
  3670. for shift := uint(0); ; shift += 7 {
  3671. if shift >= 64 {
  3672. return ErrIntOverflowWatch
  3673. }
  3674. if iNdEx >= l {
  3675. return io.ErrUnexpectedEOF
  3676. }
  3677. b := dAtA[iNdEx]
  3678. iNdEx++
  3679. stringLen |= (uint64(b) & 0x7F) << shift
  3680. if b < 0x80 {
  3681. break
  3682. }
  3683. }
  3684. intStringLen := int(stringLen)
  3685. if intStringLen < 0 {
  3686. return ErrInvalidLengthWatch
  3687. }
  3688. postIndex := iNdEx + intStringLen
  3689. if postIndex > l {
  3690. return io.ErrUnexpectedEOF
  3691. }
  3692. m.By = &SelectBy_Kind{string(dAtA[iNdEx:postIndex])}
  3693. iNdEx = postIndex
  3694. case 16:
  3695. if wireType != 2 {
  3696. return fmt.Errorf("proto: wrong wireType = %d for field ReferencedConfigID", wireType)
  3697. }
  3698. var stringLen uint64
  3699. for shift := uint(0); ; shift += 7 {
  3700. if shift >= 64 {
  3701. return ErrIntOverflowWatch
  3702. }
  3703. if iNdEx >= l {
  3704. return io.ErrUnexpectedEOF
  3705. }
  3706. b := dAtA[iNdEx]
  3707. iNdEx++
  3708. stringLen |= (uint64(b) & 0x7F) << shift
  3709. if b < 0x80 {
  3710. break
  3711. }
  3712. }
  3713. intStringLen := int(stringLen)
  3714. if intStringLen < 0 {
  3715. return ErrInvalidLengthWatch
  3716. }
  3717. postIndex := iNdEx + intStringLen
  3718. if postIndex > l {
  3719. return io.ErrUnexpectedEOF
  3720. }
  3721. m.By = &SelectBy_ReferencedConfigID{string(dAtA[iNdEx:postIndex])}
  3722. iNdEx = postIndex
  3723. default:
  3724. iNdEx = preIndex
  3725. skippy, err := skipWatch(dAtA[iNdEx:])
  3726. if err != nil {
  3727. return err
  3728. }
  3729. if skippy < 0 {
  3730. return ErrInvalidLengthWatch
  3731. }
  3732. if (iNdEx + skippy) > l {
  3733. return io.ErrUnexpectedEOF
  3734. }
  3735. iNdEx += skippy
  3736. }
  3737. }
  3738. if iNdEx > l {
  3739. return io.ErrUnexpectedEOF
  3740. }
  3741. return nil
  3742. }
  3743. func (m *WatchRequest) Unmarshal(dAtA []byte) error {
  3744. l := len(dAtA)
  3745. iNdEx := 0
  3746. for iNdEx < l {
  3747. preIndex := iNdEx
  3748. var wire uint64
  3749. for shift := uint(0); ; shift += 7 {
  3750. if shift >= 64 {
  3751. return ErrIntOverflowWatch
  3752. }
  3753. if iNdEx >= l {
  3754. return io.ErrUnexpectedEOF
  3755. }
  3756. b := dAtA[iNdEx]
  3757. iNdEx++
  3758. wire |= (uint64(b) & 0x7F) << shift
  3759. if b < 0x80 {
  3760. break
  3761. }
  3762. }
  3763. fieldNum := int32(wire >> 3)
  3764. wireType := int(wire & 0x7)
  3765. if wireType == 4 {
  3766. return fmt.Errorf("proto: WatchRequest: wiretype end group for non-group")
  3767. }
  3768. if fieldNum <= 0 {
  3769. return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3770. }
  3771. switch fieldNum {
  3772. case 1:
  3773. if wireType != 2 {
  3774. return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType)
  3775. }
  3776. var msglen int
  3777. for shift := uint(0); ; shift += 7 {
  3778. if shift >= 64 {
  3779. return ErrIntOverflowWatch
  3780. }
  3781. if iNdEx >= l {
  3782. return io.ErrUnexpectedEOF
  3783. }
  3784. b := dAtA[iNdEx]
  3785. iNdEx++
  3786. msglen |= (int(b) & 0x7F) << shift
  3787. if b < 0x80 {
  3788. break
  3789. }
  3790. }
  3791. if msglen < 0 {
  3792. return ErrInvalidLengthWatch
  3793. }
  3794. postIndex := iNdEx + msglen
  3795. if postIndex > l {
  3796. return io.ErrUnexpectedEOF
  3797. }
  3798. m.Entries = append(m.Entries, &WatchRequest_WatchEntry{})
  3799. if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3800. return err
  3801. }
  3802. iNdEx = postIndex
  3803. case 2:
  3804. if wireType != 2 {
  3805. return fmt.Errorf("proto: wrong wireType = %d for field ResumeFrom", wireType)
  3806. }
  3807. var msglen int
  3808. for shift := uint(0); ; shift += 7 {
  3809. if shift >= 64 {
  3810. return ErrIntOverflowWatch
  3811. }
  3812. if iNdEx >= l {
  3813. return io.ErrUnexpectedEOF
  3814. }
  3815. b := dAtA[iNdEx]
  3816. iNdEx++
  3817. msglen |= (int(b) & 0x7F) << shift
  3818. if b < 0x80 {
  3819. break
  3820. }
  3821. }
  3822. if msglen < 0 {
  3823. return ErrInvalidLengthWatch
  3824. }
  3825. postIndex := iNdEx + msglen
  3826. if postIndex > l {
  3827. return io.ErrUnexpectedEOF
  3828. }
  3829. if m.ResumeFrom == nil {
  3830. m.ResumeFrom = &Version{}
  3831. }
  3832. if err := m.ResumeFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3833. return err
  3834. }
  3835. iNdEx = postIndex
  3836. case 3:
  3837. if wireType != 0 {
  3838. return fmt.Errorf("proto: wrong wireType = %d for field IncludeOldObject", wireType)
  3839. }
  3840. var v int
  3841. for shift := uint(0); ; shift += 7 {
  3842. if shift >= 64 {
  3843. return ErrIntOverflowWatch
  3844. }
  3845. if iNdEx >= l {
  3846. return io.ErrUnexpectedEOF
  3847. }
  3848. b := dAtA[iNdEx]
  3849. iNdEx++
  3850. v |= (int(b) & 0x7F) << shift
  3851. if b < 0x80 {
  3852. break
  3853. }
  3854. }
  3855. m.IncludeOldObject = bool(v != 0)
  3856. default:
  3857. iNdEx = preIndex
  3858. skippy, err := skipWatch(dAtA[iNdEx:])
  3859. if err != nil {
  3860. return err
  3861. }
  3862. if skippy < 0 {
  3863. return ErrInvalidLengthWatch
  3864. }
  3865. if (iNdEx + skippy) > l {
  3866. return io.ErrUnexpectedEOF
  3867. }
  3868. iNdEx += skippy
  3869. }
  3870. }
  3871. if iNdEx > l {
  3872. return io.ErrUnexpectedEOF
  3873. }
  3874. return nil
  3875. }
  3876. func (m *WatchRequest_WatchEntry) Unmarshal(dAtA []byte) error {
  3877. l := len(dAtA)
  3878. iNdEx := 0
  3879. for iNdEx < l {
  3880. preIndex := iNdEx
  3881. var wire uint64
  3882. for shift := uint(0); ; shift += 7 {
  3883. if shift >= 64 {
  3884. return ErrIntOverflowWatch
  3885. }
  3886. if iNdEx >= l {
  3887. return io.ErrUnexpectedEOF
  3888. }
  3889. b := dAtA[iNdEx]
  3890. iNdEx++
  3891. wire |= (uint64(b) & 0x7F) << shift
  3892. if b < 0x80 {
  3893. break
  3894. }
  3895. }
  3896. fieldNum := int32(wire >> 3)
  3897. wireType := int(wire & 0x7)
  3898. if wireType == 4 {
  3899. return fmt.Errorf("proto: WatchEntry: wiretype end group for non-group")
  3900. }
  3901. if fieldNum <= 0 {
  3902. return fmt.Errorf("proto: WatchEntry: illegal tag %d (wire type %d)", fieldNum, wire)
  3903. }
  3904. switch fieldNum {
  3905. case 1:
  3906. if wireType != 2 {
  3907. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  3908. }
  3909. var stringLen uint64
  3910. for shift := uint(0); ; shift += 7 {
  3911. if shift >= 64 {
  3912. return ErrIntOverflowWatch
  3913. }
  3914. if iNdEx >= l {
  3915. return io.ErrUnexpectedEOF
  3916. }
  3917. b := dAtA[iNdEx]
  3918. iNdEx++
  3919. stringLen |= (uint64(b) & 0x7F) << shift
  3920. if b < 0x80 {
  3921. break
  3922. }
  3923. }
  3924. intStringLen := int(stringLen)
  3925. if intStringLen < 0 {
  3926. return ErrInvalidLengthWatch
  3927. }
  3928. postIndex := iNdEx + intStringLen
  3929. if postIndex > l {
  3930. return io.ErrUnexpectedEOF
  3931. }
  3932. m.Kind = string(dAtA[iNdEx:postIndex])
  3933. iNdEx = postIndex
  3934. case 2:
  3935. if wireType != 0 {
  3936. return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
  3937. }
  3938. m.Action = 0
  3939. for shift := uint(0); ; shift += 7 {
  3940. if shift >= 64 {
  3941. return ErrIntOverflowWatch
  3942. }
  3943. if iNdEx >= l {
  3944. return io.ErrUnexpectedEOF
  3945. }
  3946. b := dAtA[iNdEx]
  3947. iNdEx++
  3948. m.Action |= (WatchActionKind(b) & 0x7F) << shift
  3949. if b < 0x80 {
  3950. break
  3951. }
  3952. }
  3953. case 3:
  3954. if wireType != 2 {
  3955. return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType)
  3956. }
  3957. var msglen int
  3958. for shift := uint(0); ; shift += 7 {
  3959. if shift >= 64 {
  3960. return ErrIntOverflowWatch
  3961. }
  3962. if iNdEx >= l {
  3963. return io.ErrUnexpectedEOF
  3964. }
  3965. b := dAtA[iNdEx]
  3966. iNdEx++
  3967. msglen |= (int(b) & 0x7F) << shift
  3968. if b < 0x80 {
  3969. break
  3970. }
  3971. }
  3972. if msglen < 0 {
  3973. return ErrInvalidLengthWatch
  3974. }
  3975. postIndex := iNdEx + msglen
  3976. if postIndex > l {
  3977. return io.ErrUnexpectedEOF
  3978. }
  3979. m.Filters = append(m.Filters, &SelectBy{})
  3980. if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3981. return err
  3982. }
  3983. iNdEx = postIndex
  3984. default:
  3985. iNdEx = preIndex
  3986. skippy, err := skipWatch(dAtA[iNdEx:])
  3987. if err != nil {
  3988. return err
  3989. }
  3990. if skippy < 0 {
  3991. return ErrInvalidLengthWatch
  3992. }
  3993. if (iNdEx + skippy) > l {
  3994. return io.ErrUnexpectedEOF
  3995. }
  3996. iNdEx += skippy
  3997. }
  3998. }
  3999. if iNdEx > l {
  4000. return io.ErrUnexpectedEOF
  4001. }
  4002. return nil
  4003. }
  4004. func (m *WatchMessage) Unmarshal(dAtA []byte) error {
  4005. l := len(dAtA)
  4006. iNdEx := 0
  4007. for iNdEx < l {
  4008. preIndex := iNdEx
  4009. var wire uint64
  4010. for shift := uint(0); ; shift += 7 {
  4011. if shift >= 64 {
  4012. return ErrIntOverflowWatch
  4013. }
  4014. if iNdEx >= l {
  4015. return io.ErrUnexpectedEOF
  4016. }
  4017. b := dAtA[iNdEx]
  4018. iNdEx++
  4019. wire |= (uint64(b) & 0x7F) << shift
  4020. if b < 0x80 {
  4021. break
  4022. }
  4023. }
  4024. fieldNum := int32(wire >> 3)
  4025. wireType := int(wire & 0x7)
  4026. if wireType == 4 {
  4027. return fmt.Errorf("proto: WatchMessage: wiretype end group for non-group")
  4028. }
  4029. if fieldNum <= 0 {
  4030. return fmt.Errorf("proto: WatchMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  4031. }
  4032. switch fieldNum {
  4033. case 1:
  4034. if wireType != 2 {
  4035. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  4036. }
  4037. var msglen int
  4038. for shift := uint(0); ; shift += 7 {
  4039. if shift >= 64 {
  4040. return ErrIntOverflowWatch
  4041. }
  4042. if iNdEx >= l {
  4043. return io.ErrUnexpectedEOF
  4044. }
  4045. b := dAtA[iNdEx]
  4046. iNdEx++
  4047. msglen |= (int(b) & 0x7F) << shift
  4048. if b < 0x80 {
  4049. break
  4050. }
  4051. }
  4052. if msglen < 0 {
  4053. return ErrInvalidLengthWatch
  4054. }
  4055. postIndex := iNdEx + msglen
  4056. if postIndex > l {
  4057. return io.ErrUnexpectedEOF
  4058. }
  4059. m.Events = append(m.Events, &WatchMessage_Event{})
  4060. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4061. return err
  4062. }
  4063. iNdEx = postIndex
  4064. case 2:
  4065. if wireType != 2 {
  4066. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  4067. }
  4068. var msglen int
  4069. for shift := uint(0); ; shift += 7 {
  4070. if shift >= 64 {
  4071. return ErrIntOverflowWatch
  4072. }
  4073. if iNdEx >= l {
  4074. return io.ErrUnexpectedEOF
  4075. }
  4076. b := dAtA[iNdEx]
  4077. iNdEx++
  4078. msglen |= (int(b) & 0x7F) << shift
  4079. if b < 0x80 {
  4080. break
  4081. }
  4082. }
  4083. if msglen < 0 {
  4084. return ErrInvalidLengthWatch
  4085. }
  4086. postIndex := iNdEx + msglen
  4087. if postIndex > l {
  4088. return io.ErrUnexpectedEOF
  4089. }
  4090. if m.Version == nil {
  4091. m.Version = &Version{}
  4092. }
  4093. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4094. return err
  4095. }
  4096. iNdEx = postIndex
  4097. default:
  4098. iNdEx = preIndex
  4099. skippy, err := skipWatch(dAtA[iNdEx:])
  4100. if err != nil {
  4101. return err
  4102. }
  4103. if skippy < 0 {
  4104. return ErrInvalidLengthWatch
  4105. }
  4106. if (iNdEx + skippy) > l {
  4107. return io.ErrUnexpectedEOF
  4108. }
  4109. iNdEx += skippy
  4110. }
  4111. }
  4112. if iNdEx > l {
  4113. return io.ErrUnexpectedEOF
  4114. }
  4115. return nil
  4116. }
  4117. func (m *WatchMessage_Event) Unmarshal(dAtA []byte) error {
  4118. l := len(dAtA)
  4119. iNdEx := 0
  4120. for iNdEx < l {
  4121. preIndex := iNdEx
  4122. var wire uint64
  4123. for shift := uint(0); ; shift += 7 {
  4124. if shift >= 64 {
  4125. return ErrIntOverflowWatch
  4126. }
  4127. if iNdEx >= l {
  4128. return io.ErrUnexpectedEOF
  4129. }
  4130. b := dAtA[iNdEx]
  4131. iNdEx++
  4132. wire |= (uint64(b) & 0x7F) << shift
  4133. if b < 0x80 {
  4134. break
  4135. }
  4136. }
  4137. fieldNum := int32(wire >> 3)
  4138. wireType := int(wire & 0x7)
  4139. if wireType == 4 {
  4140. return fmt.Errorf("proto: Event: wiretype end group for non-group")
  4141. }
  4142. if fieldNum <= 0 {
  4143. return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
  4144. }
  4145. switch fieldNum {
  4146. case 1:
  4147. if wireType != 0 {
  4148. return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
  4149. }
  4150. m.Action = 0
  4151. for shift := uint(0); ; shift += 7 {
  4152. if shift >= 64 {
  4153. return ErrIntOverflowWatch
  4154. }
  4155. if iNdEx >= l {
  4156. return io.ErrUnexpectedEOF
  4157. }
  4158. b := dAtA[iNdEx]
  4159. iNdEx++
  4160. m.Action |= (WatchActionKind(b) & 0x7F) << shift
  4161. if b < 0x80 {
  4162. break
  4163. }
  4164. }
  4165. case 2:
  4166. if wireType != 2 {
  4167. return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
  4168. }
  4169. var msglen int
  4170. for shift := uint(0); ; shift += 7 {
  4171. if shift >= 64 {
  4172. return ErrIntOverflowWatch
  4173. }
  4174. if iNdEx >= l {
  4175. return io.ErrUnexpectedEOF
  4176. }
  4177. b := dAtA[iNdEx]
  4178. iNdEx++
  4179. msglen |= (int(b) & 0x7F) << shift
  4180. if b < 0x80 {
  4181. break
  4182. }
  4183. }
  4184. if msglen < 0 {
  4185. return ErrInvalidLengthWatch
  4186. }
  4187. postIndex := iNdEx + msglen
  4188. if postIndex > l {
  4189. return io.ErrUnexpectedEOF
  4190. }
  4191. if m.Object == nil {
  4192. m.Object = &Object{}
  4193. }
  4194. if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4195. return err
  4196. }
  4197. iNdEx = postIndex
  4198. case 3:
  4199. if wireType != 2 {
  4200. return fmt.Errorf("proto: wrong wireType = %d for field OldObject", wireType)
  4201. }
  4202. var msglen int
  4203. for shift := uint(0); ; shift += 7 {
  4204. if shift >= 64 {
  4205. return ErrIntOverflowWatch
  4206. }
  4207. if iNdEx >= l {
  4208. return io.ErrUnexpectedEOF
  4209. }
  4210. b := dAtA[iNdEx]
  4211. iNdEx++
  4212. msglen |= (int(b) & 0x7F) << shift
  4213. if b < 0x80 {
  4214. break
  4215. }
  4216. }
  4217. if msglen < 0 {
  4218. return ErrInvalidLengthWatch
  4219. }
  4220. postIndex := iNdEx + msglen
  4221. if postIndex > l {
  4222. return io.ErrUnexpectedEOF
  4223. }
  4224. if m.OldObject == nil {
  4225. m.OldObject = &Object{}
  4226. }
  4227. if err := m.OldObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4228. return err
  4229. }
  4230. iNdEx = postIndex
  4231. default:
  4232. iNdEx = preIndex
  4233. skippy, err := skipWatch(dAtA[iNdEx:])
  4234. if err != nil {
  4235. return err
  4236. }
  4237. if skippy < 0 {
  4238. return ErrInvalidLengthWatch
  4239. }
  4240. if (iNdEx + skippy) > l {
  4241. return io.ErrUnexpectedEOF
  4242. }
  4243. iNdEx += skippy
  4244. }
  4245. }
  4246. if iNdEx > l {
  4247. return io.ErrUnexpectedEOF
  4248. }
  4249. return nil
  4250. }
  4251. func skipWatch(dAtA []byte) (n int, err error) {
  4252. l := len(dAtA)
  4253. iNdEx := 0
  4254. for iNdEx < l {
  4255. var wire uint64
  4256. for shift := uint(0); ; shift += 7 {
  4257. if shift >= 64 {
  4258. return 0, ErrIntOverflowWatch
  4259. }
  4260. if iNdEx >= l {
  4261. return 0, io.ErrUnexpectedEOF
  4262. }
  4263. b := dAtA[iNdEx]
  4264. iNdEx++
  4265. wire |= (uint64(b) & 0x7F) << shift
  4266. if b < 0x80 {
  4267. break
  4268. }
  4269. }
  4270. wireType := int(wire & 0x7)
  4271. switch wireType {
  4272. case 0:
  4273. for shift := uint(0); ; shift += 7 {
  4274. if shift >= 64 {
  4275. return 0, ErrIntOverflowWatch
  4276. }
  4277. if iNdEx >= l {
  4278. return 0, io.ErrUnexpectedEOF
  4279. }
  4280. iNdEx++
  4281. if dAtA[iNdEx-1] < 0x80 {
  4282. break
  4283. }
  4284. }
  4285. return iNdEx, nil
  4286. case 1:
  4287. iNdEx += 8
  4288. return iNdEx, nil
  4289. case 2:
  4290. var length int
  4291. for shift := uint(0); ; shift += 7 {
  4292. if shift >= 64 {
  4293. return 0, ErrIntOverflowWatch
  4294. }
  4295. if iNdEx >= l {
  4296. return 0, io.ErrUnexpectedEOF
  4297. }
  4298. b := dAtA[iNdEx]
  4299. iNdEx++
  4300. length |= (int(b) & 0x7F) << shift
  4301. if b < 0x80 {
  4302. break
  4303. }
  4304. }
  4305. iNdEx += length
  4306. if length < 0 {
  4307. return 0, ErrInvalidLengthWatch
  4308. }
  4309. return iNdEx, nil
  4310. case 3:
  4311. for {
  4312. var innerWire uint64
  4313. var start int = iNdEx
  4314. for shift := uint(0); ; shift += 7 {
  4315. if shift >= 64 {
  4316. return 0, ErrIntOverflowWatch
  4317. }
  4318. if iNdEx >= l {
  4319. return 0, io.ErrUnexpectedEOF
  4320. }
  4321. b := dAtA[iNdEx]
  4322. iNdEx++
  4323. innerWire |= (uint64(b) & 0x7F) << shift
  4324. if b < 0x80 {
  4325. break
  4326. }
  4327. }
  4328. innerWireType := int(innerWire & 0x7)
  4329. if innerWireType == 4 {
  4330. break
  4331. }
  4332. next, err := skipWatch(dAtA[start:])
  4333. if err != nil {
  4334. return 0, err
  4335. }
  4336. iNdEx = start + next
  4337. }
  4338. return iNdEx, nil
  4339. case 4:
  4340. return iNdEx, nil
  4341. case 5:
  4342. iNdEx += 4
  4343. return iNdEx, nil
  4344. default:
  4345. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4346. }
  4347. }
  4348. panic("unreachable")
  4349. }
  4350. var (
  4351. ErrInvalidLengthWatch = fmt.Errorf("proto: negative length found during unmarshaling")
  4352. ErrIntOverflowWatch = fmt.Errorf("proto: integer overflow")
  4353. )
  4354. func init() { proto.RegisterFile("watch.proto", fileDescriptorWatch) }
  4355. var fileDescriptorWatch = []byte{
  4356. // 1155 bytes of a gzipped FileDescriptorProto
  4357. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0xbb, 0x73, 0x1b, 0xd5,
  4358. 0x17, 0xc7, 0xb5, 0x8a, 0xbc, 0x92, 0x8e, 0xac, 0xc4, 0x73, 0xed, 0x24, 0xfb, 0xd3, 0x2f, 0x48,
  4359. 0x42, 0x0c, 0xe0, 0x21, 0x41, 0x01, 0x13, 0xc2, 0x00, 0x81, 0x19, 0x4b, 0x16, 0x23, 0x91, 0xb1,
  4360. 0xec, 0xb9, 0xb6, 0xe3, 0x52, 0xb3, 0xde, 0x3d, 0x56, 0x16, 0xed, 0x43, 0xdc, 0x5d, 0xc9, 0x71,
  4361. 0x47, 0x41, 0xc1, 0xa4, 0x67, 0x86, 0x26, 0x15, 0xd4, 0x34, 0x74, 0xf0, 0x0f, 0x64, 0xa8, 0x28,
  4362. 0xa1, 0xd1, 0x10, 0x95, 0x14, 0xfc, 0x05, 0x14, 0xcc, 0x7d, 0xac, 0x1f, 0xca, 0xca, 0x21, 0x95,
  4363. 0xee, 0xbd, 0xfb, 0xf9, 0x9e, 0x7b, 0xf6, 0xbc, 0x56, 0x50, 0x38, 0x32, 0x23, 0xeb, 0x61, 0x7d,
  4364. 0xc8, 0x82, 0x28, 0x20, 0xc4, 0x0e, 0xac, 0x01, 0xb2, 0x7a, 0x78, 0x64, 0x32, 0x6f, 0xe0, 0x44,
  4365. 0xf5, 0xf1, 0xbb, 0xa5, 0x42, 0x38, 0x44, 0x2b, 0x94, 0x40, 0xa9, 0x18, 0x1c, 0x7c, 0x81, 0x56,
  4366. 0x14, 0x6f, 0x0b, 0xd1, 0xf1, 0x10, 0xe3, 0xcd, 0x4a, 0x3f, 0xe8, 0x07, 0x62, 0x79, 0x9b, 0xaf,
  4367. 0xd4, 0xe9, 0xf2, 0xd0, 0x1d, 0xf5, 0x1d, 0xff, 0xb6, 0xfc, 0x91, 0x87, 0xb5, 0xaf, 0x33, 0xa0,
  4368. 0x6f, 0x09, 0x4b, 0xa4, 0x0e, 0x19, 0x3f, 0xb0, 0xd1, 0xd0, 0xaa, 0xda, 0x6a, 0x61, 0xcd, 0xa8,
  4369. 0x3f, 0xef, 0x41, 0xbd, 0x1b, 0xd8, 0xd8, 0x4e, 0x51, 0xc1, 0x91, 0x0f, 0x20, 0x1b, 0x22, 0x1b,
  4370. 0x3b, 0x16, 0x1a, 0x69, 0x21, 0xf9, 0x7f, 0x92, 0x64, 0x47, 0x22, 0xed, 0x14, 0x8d, 0x69, 0x2e,
  4371. 0xf4, 0x31, 0x3a, 0x0a, 0xd8, 0xc0, 0xb8, 0x34, 0x5f, 0xd8, 0x95, 0x08, 0x17, 0x2a, 0x9a, 0x7b,
  4372. 0x18, 0x99, 0xe1, 0xc0, 0xc8, 0xcc, 0xf7, 0x70, 0xd7, 0x0c, 0xb9, 0x44, 0x70, 0xfc, 0x22, 0xcb,
  4373. 0x1d, 0x85, 0x11, 0x32, 0x63, 0x61, 0xfe, 0x45, 0x4d, 0x89, 0xf0, 0x8b, 0x14, 0x4d, 0xee, 0x80,
  4374. 0x1e, 0xa2, 0xc5, 0x30, 0x32, 0x74, 0xa1, 0x2b, 0x25, 0xbf, 0x19, 0x27, 0xda, 0x29, 0xaa, 0x58,
  4375. 0xf2, 0x11, 0xe4, 0x18, 0x86, 0xc1, 0x88, 0x59, 0x68, 0x64, 0x85, 0xee, 0x46, 0x92, 0x8e, 0x2a,
  4376. 0xa6, 0x9d, 0xa2, 0x27, 0x3c, 0xf9, 0x04, 0xf2, 0xf8, 0x28, 0x42, 0x3f, 0x74, 0x02, 0xdf, 0xc8,
  4377. 0x09, 0xf1, 0x2b, 0x49, 0xe2, 0x56, 0x0c, 0xb5, 0x53, 0xf4, 0x54, 0xc1, 0x1d, 0xb6, 0x02, 0xff,
  4378. 0xd0, 0xe9, 0x1b, 0xf9, 0xf9, 0x0e, 0x37, 0x05, 0xc1, 0x1d, 0x96, 0x6c, 0x23, 0x17, 0xe7, 0xbe,
  4379. 0xb6, 0x0d, 0x8b, 0x3b, 0xe8, 0xa2, 0x15, 0x35, 0x8e, 0x77, 0xdc, 0x20, 0x22, 0xb7, 0x00, 0x54,
  4380. 0xb6, 0x7a, 0x8e, 0x2d, 0x2a, 0x22, 0xdf, 0x28, 0x4e, 0x27, 0x95, 0xbc, 0x4a, 0x67, 0x67, 0x83,
  4381. 0xe6, 0x15, 0xd0, 0xb1, 0x09, 0x81, 0x4c, 0xe8, 0x06, 0x91, 0x28, 0x83, 0x0c, 0x15, 0xeb, 0xda,
  4382. 0x36, 0x5c, 0x8e, 0x2d, 0x36, 0x47, 0x61, 0x14, 0x78, 0x9c, 0x1a, 0x38, 0xbe, 0xb2, 0x46, 0xc5,
  4383. 0x9a, 0xac, 0xc0, 0x82, 0xe3, 0xdb, 0xf8, 0x48, 0x48, 0xf3, 0x54, 0x6e, 0xf8, 0xe9, 0xd8, 0x74,
  4384. 0x47, 0x28, 0xca, 0x23, 0x4f, 0xe5, 0xa6, 0xf6, 0x97, 0x0e, 0xb9, 0xd8, 0x24, 0x31, 0x20, 0x7d,
  4385. 0xe2, 0x98, 0x3e, 0x9d, 0x54, 0xd2, 0x9d, 0x8d, 0x76, 0x8a, 0xa6, 0x1d, 0x9b, 0xdc, 0x84, 0xbc,
  4386. 0x63, 0xf7, 0x86, 0x0c, 0x0f, 0x1d, 0x65, 0xb6, 0xb1, 0x38, 0x9d, 0x54, 0x72, 0x9d, 0x8d, 0x6d,
  4387. 0x71, 0xc6, 0xc3, 0xee, 0xd8, 0x72, 0x4d, 0x56, 0x20, 0xe3, 0x9b, 0x9e, 0xba, 0x48, 0x54, 0xb6,
  4388. 0xe9, 0x21, 0x79, 0x15, 0x0a, 0xfc, 0x37, 0x36, 0x92, 0x51, 0x0f, 0x81, 0x1f, 0x2a, 0xe1, 0x3d,
  4389. 0xd0, 0x2d, 0xf1, 0x5a, 0xaa, 0xb2, 0x6a, 0xc9, 0x15, 0x72, 0x36, 0x00, 0x22, 0xf0, 0x32, 0x14,
  4390. 0x1d, 0x28, 0xca, 0x55, 0x7c, 0x85, 0xfe, 0x12, 0x46, 0x16, 0xa5, 0x54, 0x39, 0x52, 0x3f, 0x97,
  4391. 0xa9, 0x6c, 0x42, 0xa6, 0x78, 0xa5, 0x9c, 0xe6, 0xea, 0x75, 0xc8, 0xf2, 0xee, 0xe5, 0x70, 0x4e,
  4392. 0xc0, 0x30, 0x9d, 0x54, 0x74, 0xde, 0xd8, 0x82, 0xd4, 0xf9, 0xc3, 0x8e, 0x4d, 0xee, 0xaa, 0x94,
  4393. 0xca, 0x72, 0xaa, 0x5e, 0xe4, 0x18, 0x2f, 0x18, 0x1e, 0x3a, 0xce, 0x93, 0x0d, 0x28, 0xda, 0x18,
  4394. 0x3a, 0x0c, 0xed, 0x5e, 0x18, 0x99, 0x11, 0x1a, 0x50, 0xd5, 0x56, 0x2f, 0x27, 0xd7, 0x32, 0xef,
  4395. 0xd5, 0x1d, 0x0e, 0xf1, 0x97, 0x52, 0x2a, 0xb1, 0x27, 0x6b, 0x90, 0x61, 0x81, 0x8b, 0x46, 0x41,
  4396. 0x88, 0x6f, 0xcc, 0x1b, 0x45, 0x34, 0x70, 0xc5, 0x38, 0xe2, 0x2c, 0xe9, 0x00, 0x78, 0xe8, 0x1d,
  4397. 0x20, 0x0b, 0x1f, 0x3a, 0x43, 0x63, 0x51, 0x28, 0xdf, 0x9c, 0xa7, 0xdc, 0x19, 0xa2, 0x55, 0xdf,
  4398. 0x3c, 0xc1, 0x79, 0x72, 0x4f, 0xc5, 0x64, 0x13, 0xae, 0x32, 0x3c, 0x44, 0x86, 0xbe, 0x85, 0x76,
  4399. 0x4f, 0x4d, 0x1f, 0x1e, 0xb1, 0xa2, 0x88, 0xd8, 0xf5, 0xe9, 0xa4, 0xb2, 0x4c, 0x4f, 0x00, 0x35,
  4400. 0xa8, 0x44, 0xf8, 0x96, 0xd9, 0x73, 0xc7, 0x36, 0xf9, 0x1c, 0x56, 0xce, 0x98, 0x93, 0xc3, 0x82,
  4401. 0x5b, 0xbb, 0x2c, 0xac, 0x5d, 0x9b, 0x4e, 0x2a, 0xe4, 0xd4, 0x9a, 0x9c, 0x2a, 0xc2, 0x18, 0x61,
  4402. 0xb3, 0xa7, 0xbc, 0x61, 0x64, 0x13, 0x5d, 0x89, 0x0b, 0x56, 0xb4, 0xd1, 0xf9, 0x1b, 0x64, 0x77,
  4403. 0xf3, 0x1b, 0x96, 0x92, 0x6e, 0x90, 0x63, 0x60, 0xf6, 0x06, 0x75, 0x6a, 0x37, 0x32, 0x90, 0x6e,
  4404. 0x1c, 0xd7, 0xfe, 0x48, 0xc3, 0xe2, 0x3e, 0xff, 0x1e, 0x51, 0xfc, 0x72, 0x84, 0x61, 0x44, 0x5a,
  4405. 0x90, 0x45, 0x3f, 0x62, 0x0e, 0x86, 0x86, 0x56, 0xbd, 0xb4, 0x5a, 0x58, 0xbb, 0x99, 0x14, 0xdb,
  4406. 0xb3, 0x12, 0xb9, 0x69, 0xf9, 0x11, 0x3b, 0xa6, 0xb1, 0x96, 0xdc, 0x83, 0x02, 0xc3, 0x70, 0xe4,
  4407. 0x61, 0xef, 0x90, 0x05, 0xde, 0x45, 0x1f, 0x8e, 0x07, 0xc8, 0xf8, 0x68, 0xa3, 0x20, 0xf9, 0xcf,
  4408. 0x58, 0xe0, 0x91, 0x5b, 0x40, 0x1c, 0xdf, 0x72, 0x47, 0x36, 0xf6, 0x02, 0xd7, 0xee, 0xc9, 0x4f,
  4409. 0xa0, 0x68, 0xde, 0x1c, 0x5d, 0x52, 0x4f, 0xb6, 0x5c, 0x5b, 0x0e, 0xb5, 0xd2, 0xb7, 0x1a, 0xc0,
  4410. 0xa9, 0x0f, 0x89, 0xf3, 0xe7, 0x63, 0xd0, 0x4d, 0x2b, 0xe2, 0x33, 0x37, 0x2d, 0x0a, 0xe6, 0xb5,
  4411. 0xb9, 0x2f, 0xb5, 0x2e, 0xb0, 0xfb, 0x8e, 0x6f, 0x53, 0x25, 0x21, 0x77, 0x21, 0x7b, 0xe8, 0xb8,
  4412. 0x11, 0xb2, 0xd0, 0xb8, 0x24, 0x42, 0x72, 0xe3, 0xa2, 0x36, 0xa1, 0x31, 0x5c, 0xfb, 0x25, 0x8e,
  4413. 0xed, 0x26, 0x86, 0xa1, 0xd9, 0x47, 0xf2, 0x29, 0xe8, 0x38, 0x46, 0x3f, 0x8a, 0x43, 0xfb, 0xc6,
  4414. 0x5c, 0x2f, 0x94, 0xa2, 0xde, 0xe2, 0x38, 0x55, 0x2a, 0xf2, 0x3e, 0x64, 0xc7, 0x32, 0x5a, 0xff,
  4415. 0x25, 0xa0, 0x31, 0x5b, 0xfa, 0x49, 0x83, 0x05, 0x61, 0xe8, 0x4c, 0x18, 0xb4, 0x97, 0x0f, 0xc3,
  4416. 0x1a, 0xe8, 0x2a, 0x11, 0xe9, 0xf9, 0xdf, 0x1e, 0x99, 0x12, 0xaa, 0x48, 0xf2, 0x21, 0xc0, 0x4c,
  4417. 0x02, 0x2f, 0xd6, 0xe5, 0x83, 0x38, 0xab, 0x6f, 0xfd, 0xa3, 0xc1, 0x95, 0x19, 0x57, 0xc8, 0x1d,
  4418. 0x58, 0xd9, 0x5f, 0xdf, 0x6d, 0xb6, 0x7b, 0xeb, 0xcd, 0xdd, 0xce, 0x56, 0xb7, 0xb7, 0xd7, 0xbd,
  4419. 0xdf, 0xdd, 0xda, 0xef, 0x2e, 0xa5, 0x4a, 0xa5, 0xc7, 0x4f, 0xaa, 0xd7, 0x66, 0xf0, 0x3d, 0x7f,
  4420. 0xe0, 0x07, 0x47, 0xdc, 0xf1, 0xe5, 0x73, 0xaa, 0x26, 0x6d, 0xad, 0xef, 0xb6, 0x96, 0xb4, 0xd2,
  4421. 0xff, 0x1e, 0x3f, 0xa9, 0x5e, 0x9d, 0x11, 0x35, 0x19, 0xca, 0xc9, 0x74, 0x5e, 0xb3, 0xb7, 0xbd,
  4422. 0xc1, 0x35, 0xe9, 0x44, 0xcd, 0xde, 0xd0, 0x4e, 0xd2, 0xd0, 0xd6, 0xe6, 0xd6, 0x83, 0xd6, 0x52,
  4423. 0x26, 0x51, 0x43, 0xd1, 0x0b, 0xc6, 0x58, 0xba, 0xfe, 0xcd, 0xf7, 0xe5, 0xd4, 0xcf, 0x3f, 0x94,
  4424. 0x67, 0x5f, 0x75, 0xcd, 0x83, 0x05, 0x71, 0x44, 0xec, 0x78, 0x51, 0x7d, 0x51, 0x23, 0x96, 0xaa,
  4425. 0x2f, 0xaa, 0xa7, 0xda, 0xd5, 0x5f, 0x7f, 0xfc, 0xfb, 0xbb, 0xf4, 0x15, 0x28, 0x0a, 0xe2, 0x6d,
  4426. 0xcf, 0xf4, 0xcd, 0x3e, 0xb2, 0x77, 0xb4, 0x86, 0xf1, 0xf4, 0x59, 0x39, 0xf5, 0xfb, 0xb3, 0x72,
  4427. 0xea, 0xab, 0x69, 0x59, 0x7b, 0x3a, 0x2d, 0x6b, 0xbf, 0x4d, 0xcb, 0xda, 0x9f, 0xd3, 0xb2, 0x76,
  4428. 0xa0, 0x8b, 0x3f, 0x90, 0xef, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x53, 0xd9, 0x73, 0xb7,
  4429. 0x0a, 0x00, 0x00,
  4430. }