logbroker.pb.go 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176
  1. // Code generated by protoc-gen-gogo.
  2. // source: logbroker.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 google_protobuf "github.com/gogo/protobuf/types"
  10. import _ "github.com/docker/swarmkit/protobuf/plugin"
  11. import github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
  12. import (
  13. context "golang.org/x/net/context"
  14. grpc "google.golang.org/grpc"
  15. )
  16. import raftselector "github.com/docker/swarmkit/manager/raftselector"
  17. import codes "google.golang.org/grpc/codes"
  18. import metadata "google.golang.org/grpc/metadata"
  19. import transport "google.golang.org/grpc/transport"
  20. import rafttime "time"
  21. import strings "strings"
  22. import reflect "reflect"
  23. import io "io"
  24. // Reference imports to suppress errors if they are not otherwise used.
  25. var _ = proto.Marshal
  26. var _ = fmt.Errorf
  27. var _ = math.Inf
  28. // LogStream defines the stream from which the log message came.
  29. type LogStream int32
  30. const (
  31. LogStreamUnknown LogStream = 0
  32. LogStreamStdout LogStream = 1
  33. LogStreamStderr LogStream = 2
  34. )
  35. var LogStream_name = map[int32]string{
  36. 0: "LOG_STREAM_UNKNOWN",
  37. 1: "LOG_STREAM_STDOUT",
  38. 2: "LOG_STREAM_STDERR",
  39. }
  40. var LogStream_value = map[string]int32{
  41. "LOG_STREAM_UNKNOWN": 0,
  42. "LOG_STREAM_STDOUT": 1,
  43. "LOG_STREAM_STDERR": 2,
  44. }
  45. func (x LogStream) String() string {
  46. return proto.EnumName(LogStream_name, int32(x))
  47. }
  48. func (LogStream) EnumDescriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{0} }
  49. type LogSubscriptionOptions struct {
  50. // Streams defines which log streams should be sent from the task source.
  51. // Empty means send all the messages.
  52. Streams []LogStream `protobuf:"varint,1,rep,packed,name=streams,enum=docker.swarmkit.v1.LogStream" json:"streams,omitempty"`
  53. // Follow instructs the publisher to continue sending log messages as they
  54. // are produced, after satisfying the initial query.
  55. Follow bool `protobuf:"varint,2,opt,name=follow,proto3" json:"follow,omitempty"`
  56. // Tail defines how many messages relative to the log stream to send when
  57. // starting the stream.
  58. //
  59. // Positive values will skip that number of messages from the start of the
  60. // stream before publishing.
  61. //
  62. // Negative values will specify messages relative to the end of the stream,
  63. // offset by one. We can say that the last (-n-1) lines are returned when n
  64. // < 0. As reference, -1 would mean send no log lines (typically used with
  65. // follow), -2 would return the last log line, -11 would return the last 10
  66. // and so on.
  67. //
  68. // The default value of zero will return all logs.
  69. //
  70. // Note that this is very different from the Docker API.
  71. Tail int64 `protobuf:"varint,3,opt,name=tail,proto3" json:"tail,omitempty"`
  72. // Since indicates that only log messages produced after this timestamp
  73. // should be sent.
  74. // Note: can't use stdtime because this field is nullable.
  75. Since *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=since" json:"since,omitempty"`
  76. }
  77. func (m *LogSubscriptionOptions) Reset() { *m = LogSubscriptionOptions{} }
  78. func (*LogSubscriptionOptions) ProtoMessage() {}
  79. func (*LogSubscriptionOptions) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{0} }
  80. // LogSelector will match logs from ANY of the defined parameters.
  81. //
  82. // For the best effect, the client should use the least specific parameter
  83. // possible. For example, if they want to listen to all the tasks of a service,
  84. // they should use the service id, rather than specifying the individual tasks.
  85. type LogSelector struct {
  86. ServiceIDs []string `protobuf:"bytes,1,rep,name=service_ids,json=serviceIds" json:"service_ids,omitempty"`
  87. NodeIDs []string `protobuf:"bytes,2,rep,name=node_ids,json=nodeIds" json:"node_ids,omitempty"`
  88. TaskIDs []string `protobuf:"bytes,3,rep,name=task_ids,json=taskIds" json:"task_ids,omitempty"`
  89. }
  90. func (m *LogSelector) Reset() { *m = LogSelector{} }
  91. func (*LogSelector) ProtoMessage() {}
  92. func (*LogSelector) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{1} }
  93. // LogContext marks the context from which a log message was generated.
  94. type LogContext struct {
  95. ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
  96. NodeID string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
  97. TaskID string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
  98. }
  99. func (m *LogContext) Reset() { *m = LogContext{} }
  100. func (*LogContext) ProtoMessage() {}
  101. func (*LogContext) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{2} }
  102. // LogMessage
  103. type LogMessage struct {
  104. // Context identifies the source of the log message.
  105. Context LogContext `protobuf:"bytes,1,opt,name=context" json:"context"`
  106. // Timestamp is the time at which the message was generated.
  107. // Note: can't use stdtime because this field is nullable.
  108. Timestamp *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"`
  109. // Stream identifies the stream of the log message, stdout or stderr.
  110. Stream LogStream `protobuf:"varint,3,opt,name=stream,proto3,enum=docker.swarmkit.v1.LogStream" json:"stream,omitempty"`
  111. // Data is the raw log message, as generated by the application.
  112. Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
  113. }
  114. func (m *LogMessage) Reset() { *m = LogMessage{} }
  115. func (*LogMessage) ProtoMessage() {}
  116. func (*LogMessage) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{3} }
  117. type SubscribeLogsRequest struct {
  118. // LogSelector describes the logs to which the subscriber is
  119. Selector *LogSelector `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
  120. Options *LogSubscriptionOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
  121. }
  122. func (m *SubscribeLogsRequest) Reset() { *m = SubscribeLogsRequest{} }
  123. func (*SubscribeLogsRequest) ProtoMessage() {}
  124. func (*SubscribeLogsRequest) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{4} }
  125. type SubscribeLogsMessage struct {
  126. Messages []LogMessage `protobuf:"bytes,1,rep,name=messages" json:"messages"`
  127. }
  128. func (m *SubscribeLogsMessage) Reset() { *m = SubscribeLogsMessage{} }
  129. func (*SubscribeLogsMessage) ProtoMessage() {}
  130. func (*SubscribeLogsMessage) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{5} }
  131. // ListenSubscriptionsRequest is a placeholder to begin listening for
  132. // subscriptions.
  133. type ListenSubscriptionsRequest struct {
  134. }
  135. func (m *ListenSubscriptionsRequest) Reset() { *m = ListenSubscriptionsRequest{} }
  136. func (*ListenSubscriptionsRequest) ProtoMessage() {}
  137. func (*ListenSubscriptionsRequest) Descriptor() ([]byte, []int) {
  138. return fileDescriptorLogbroker, []int{6}
  139. }
  140. // SubscriptionMessage instructs the listener to start publishing messages for
  141. // the stream or end a subscription.
  142. //
  143. // If Options.Follow == false, the worker should end the subscription on its own.
  144. type SubscriptionMessage struct {
  145. // ID identifies the subscription.
  146. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  147. // Selector defines which sources should be sent for the subscription.
  148. Selector *LogSelector `protobuf:"bytes,2,opt,name=selector" json:"selector,omitempty"`
  149. // Options specify how the subscription should be satisfied.
  150. Options *LogSubscriptionOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
  151. // Close will be true if the node should shutdown the subscription with the
  152. // provided identifier.
  153. Close bool `protobuf:"varint,4,opt,name=close,proto3" json:"close,omitempty"`
  154. }
  155. func (m *SubscriptionMessage) Reset() { *m = SubscriptionMessage{} }
  156. func (*SubscriptionMessage) ProtoMessage() {}
  157. func (*SubscriptionMessage) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{7} }
  158. type PublishLogsMessage struct {
  159. // SubscriptionID identifies which subscription the set of messages should
  160. // be sent to. We can think of this as a "mail box" for the subscription.
  161. SubscriptionID string `protobuf:"bytes,1,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"`
  162. // Messages is the log message for publishing.
  163. Messages []LogMessage `protobuf:"bytes,2,rep,name=messages" json:"messages"`
  164. // Close is a boolean for whether or not the client has completed its log
  165. // stream. When close is called, the manager can hang up the subscription.
  166. // Any further logs from this subscription are an error condition. Any
  167. // messages included when close is set can be discarded
  168. Close bool `protobuf:"varint,3,opt,name=close,proto3" json:"close,omitempty"`
  169. }
  170. func (m *PublishLogsMessage) Reset() { *m = PublishLogsMessage{} }
  171. func (*PublishLogsMessage) ProtoMessage() {}
  172. func (*PublishLogsMessage) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{8} }
  173. type PublishLogsResponse struct {
  174. }
  175. func (m *PublishLogsResponse) Reset() { *m = PublishLogsResponse{} }
  176. func (*PublishLogsResponse) ProtoMessage() {}
  177. func (*PublishLogsResponse) Descriptor() ([]byte, []int) { return fileDescriptorLogbroker, []int{9} }
  178. func init() {
  179. proto.RegisterType((*LogSubscriptionOptions)(nil), "docker.swarmkit.v1.LogSubscriptionOptions")
  180. proto.RegisterType((*LogSelector)(nil), "docker.swarmkit.v1.LogSelector")
  181. proto.RegisterType((*LogContext)(nil), "docker.swarmkit.v1.LogContext")
  182. proto.RegisterType((*LogMessage)(nil), "docker.swarmkit.v1.LogMessage")
  183. proto.RegisterType((*SubscribeLogsRequest)(nil), "docker.swarmkit.v1.SubscribeLogsRequest")
  184. proto.RegisterType((*SubscribeLogsMessage)(nil), "docker.swarmkit.v1.SubscribeLogsMessage")
  185. proto.RegisterType((*ListenSubscriptionsRequest)(nil), "docker.swarmkit.v1.ListenSubscriptionsRequest")
  186. proto.RegisterType((*SubscriptionMessage)(nil), "docker.swarmkit.v1.SubscriptionMessage")
  187. proto.RegisterType((*PublishLogsMessage)(nil), "docker.swarmkit.v1.PublishLogsMessage")
  188. proto.RegisterType((*PublishLogsResponse)(nil), "docker.swarmkit.v1.PublishLogsResponse")
  189. proto.RegisterEnum("docker.swarmkit.v1.LogStream", LogStream_name, LogStream_value)
  190. }
  191. type authenticatedWrapperLogsServer struct {
  192. local LogsServer
  193. authorize func(context.Context, []string) error
  194. }
  195. func NewAuthenticatedWrapperLogsServer(local LogsServer, authorize func(context.Context, []string) error) LogsServer {
  196. return &authenticatedWrapperLogsServer{
  197. local: local,
  198. authorize: authorize,
  199. }
  200. }
  201. func (p *authenticatedWrapperLogsServer) SubscribeLogs(r *SubscribeLogsRequest, stream Logs_SubscribeLogsServer) error {
  202. if err := p.authorize(stream.Context(), []string{"swarm-manager"}); err != nil {
  203. return err
  204. }
  205. return p.local.SubscribeLogs(r, stream)
  206. }
  207. type authenticatedWrapperLogBrokerServer struct {
  208. local LogBrokerServer
  209. authorize func(context.Context, []string) error
  210. }
  211. func NewAuthenticatedWrapperLogBrokerServer(local LogBrokerServer, authorize func(context.Context, []string) error) LogBrokerServer {
  212. return &authenticatedWrapperLogBrokerServer{
  213. local: local,
  214. authorize: authorize,
  215. }
  216. }
  217. func (p *authenticatedWrapperLogBrokerServer) ListenSubscriptions(r *ListenSubscriptionsRequest, stream LogBroker_ListenSubscriptionsServer) error {
  218. if err := p.authorize(stream.Context(), []string{"swarm-worker", "swarm-manager"}); err != nil {
  219. return err
  220. }
  221. return p.local.ListenSubscriptions(r, stream)
  222. }
  223. func (p *authenticatedWrapperLogBrokerServer) PublishLogs(stream LogBroker_PublishLogsServer) error {
  224. if err := p.authorize(stream.Context(), []string{"swarm-worker", "swarm-manager"}); err != nil {
  225. return err
  226. }
  227. return p.local.PublishLogs(stream)
  228. }
  229. func (m *LogSubscriptionOptions) Copy() *LogSubscriptionOptions {
  230. if m == nil {
  231. return nil
  232. }
  233. o := &LogSubscriptionOptions{}
  234. o.CopyFrom(m)
  235. return o
  236. }
  237. func (m *LogSubscriptionOptions) CopyFrom(src interface{}) {
  238. o := src.(*LogSubscriptionOptions)
  239. *m = *o
  240. if o.Streams != nil {
  241. m.Streams = make([]LogStream, len(o.Streams))
  242. copy(m.Streams, o.Streams)
  243. }
  244. if o.Since != nil {
  245. m.Since = &google_protobuf.Timestamp{}
  246. github_com_docker_swarmkit_api_deepcopy.Copy(m.Since, o.Since)
  247. }
  248. }
  249. func (m *LogSelector) Copy() *LogSelector {
  250. if m == nil {
  251. return nil
  252. }
  253. o := &LogSelector{}
  254. o.CopyFrom(m)
  255. return o
  256. }
  257. func (m *LogSelector) CopyFrom(src interface{}) {
  258. o := src.(*LogSelector)
  259. *m = *o
  260. if o.ServiceIDs != nil {
  261. m.ServiceIDs = make([]string, len(o.ServiceIDs))
  262. copy(m.ServiceIDs, o.ServiceIDs)
  263. }
  264. if o.NodeIDs != nil {
  265. m.NodeIDs = make([]string, len(o.NodeIDs))
  266. copy(m.NodeIDs, o.NodeIDs)
  267. }
  268. if o.TaskIDs != nil {
  269. m.TaskIDs = make([]string, len(o.TaskIDs))
  270. copy(m.TaskIDs, o.TaskIDs)
  271. }
  272. }
  273. func (m *LogContext) Copy() *LogContext {
  274. if m == nil {
  275. return nil
  276. }
  277. o := &LogContext{}
  278. o.CopyFrom(m)
  279. return o
  280. }
  281. func (m *LogContext) CopyFrom(src interface{}) {
  282. o := src.(*LogContext)
  283. *m = *o
  284. }
  285. func (m *LogMessage) Copy() *LogMessage {
  286. if m == nil {
  287. return nil
  288. }
  289. o := &LogMessage{}
  290. o.CopyFrom(m)
  291. return o
  292. }
  293. func (m *LogMessage) CopyFrom(src interface{}) {
  294. o := src.(*LogMessage)
  295. *m = *o
  296. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Context, &o.Context)
  297. if o.Timestamp != nil {
  298. m.Timestamp = &google_protobuf.Timestamp{}
  299. github_com_docker_swarmkit_api_deepcopy.Copy(m.Timestamp, o.Timestamp)
  300. }
  301. if o.Data != nil {
  302. m.Data = make([]byte, len(o.Data))
  303. copy(m.Data, o.Data)
  304. }
  305. }
  306. func (m *SubscribeLogsRequest) Copy() *SubscribeLogsRequest {
  307. if m == nil {
  308. return nil
  309. }
  310. o := &SubscribeLogsRequest{}
  311. o.CopyFrom(m)
  312. return o
  313. }
  314. func (m *SubscribeLogsRequest) CopyFrom(src interface{}) {
  315. o := src.(*SubscribeLogsRequest)
  316. *m = *o
  317. if o.Selector != nil {
  318. m.Selector = &LogSelector{}
  319. github_com_docker_swarmkit_api_deepcopy.Copy(m.Selector, o.Selector)
  320. }
  321. if o.Options != nil {
  322. m.Options = &LogSubscriptionOptions{}
  323. github_com_docker_swarmkit_api_deepcopy.Copy(m.Options, o.Options)
  324. }
  325. }
  326. func (m *SubscribeLogsMessage) Copy() *SubscribeLogsMessage {
  327. if m == nil {
  328. return nil
  329. }
  330. o := &SubscribeLogsMessage{}
  331. o.CopyFrom(m)
  332. return o
  333. }
  334. func (m *SubscribeLogsMessage) CopyFrom(src interface{}) {
  335. o := src.(*SubscribeLogsMessage)
  336. *m = *o
  337. if o.Messages != nil {
  338. m.Messages = make([]LogMessage, len(o.Messages))
  339. for i := range m.Messages {
  340. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Messages[i], &o.Messages[i])
  341. }
  342. }
  343. }
  344. func (m *ListenSubscriptionsRequest) Copy() *ListenSubscriptionsRequest {
  345. if m == nil {
  346. return nil
  347. }
  348. o := &ListenSubscriptionsRequest{}
  349. o.CopyFrom(m)
  350. return o
  351. }
  352. func (m *ListenSubscriptionsRequest) CopyFrom(src interface{}) {}
  353. func (m *SubscriptionMessage) Copy() *SubscriptionMessage {
  354. if m == nil {
  355. return nil
  356. }
  357. o := &SubscriptionMessage{}
  358. o.CopyFrom(m)
  359. return o
  360. }
  361. func (m *SubscriptionMessage) CopyFrom(src interface{}) {
  362. o := src.(*SubscriptionMessage)
  363. *m = *o
  364. if o.Selector != nil {
  365. m.Selector = &LogSelector{}
  366. github_com_docker_swarmkit_api_deepcopy.Copy(m.Selector, o.Selector)
  367. }
  368. if o.Options != nil {
  369. m.Options = &LogSubscriptionOptions{}
  370. github_com_docker_swarmkit_api_deepcopy.Copy(m.Options, o.Options)
  371. }
  372. }
  373. func (m *PublishLogsMessage) Copy() *PublishLogsMessage {
  374. if m == nil {
  375. return nil
  376. }
  377. o := &PublishLogsMessage{}
  378. o.CopyFrom(m)
  379. return o
  380. }
  381. func (m *PublishLogsMessage) CopyFrom(src interface{}) {
  382. o := src.(*PublishLogsMessage)
  383. *m = *o
  384. if o.Messages != nil {
  385. m.Messages = make([]LogMessage, len(o.Messages))
  386. for i := range m.Messages {
  387. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Messages[i], &o.Messages[i])
  388. }
  389. }
  390. }
  391. func (m *PublishLogsResponse) Copy() *PublishLogsResponse {
  392. if m == nil {
  393. return nil
  394. }
  395. o := &PublishLogsResponse{}
  396. o.CopyFrom(m)
  397. return o
  398. }
  399. func (m *PublishLogsResponse) CopyFrom(src interface{}) {}
  400. // Reference imports to suppress errors if they are not otherwise used.
  401. var _ context.Context
  402. var _ grpc.ClientConn
  403. // This is a compile-time assertion to ensure that this generated file
  404. // is compatible with the grpc package it is being compiled against.
  405. const _ = grpc.SupportPackageIsVersion4
  406. // Client API for Logs service
  407. type LogsClient interface {
  408. // SubscribeLogs starts a subscription with the specified selector and options.
  409. //
  410. // The subscription will be distributed to relevant nodes and messages will
  411. // be collected and sent via the returned stream.
  412. //
  413. // The subscription will end with an EOF.
  414. SubscribeLogs(ctx context.Context, in *SubscribeLogsRequest, opts ...grpc.CallOption) (Logs_SubscribeLogsClient, error)
  415. }
  416. type logsClient struct {
  417. cc *grpc.ClientConn
  418. }
  419. func NewLogsClient(cc *grpc.ClientConn) LogsClient {
  420. return &logsClient{cc}
  421. }
  422. func (c *logsClient) SubscribeLogs(ctx context.Context, in *SubscribeLogsRequest, opts ...grpc.CallOption) (Logs_SubscribeLogsClient, error) {
  423. stream, err := grpc.NewClientStream(ctx, &_Logs_serviceDesc.Streams[0], c.cc, "/docker.swarmkit.v1.Logs/SubscribeLogs", opts...)
  424. if err != nil {
  425. return nil, err
  426. }
  427. x := &logsSubscribeLogsClient{stream}
  428. if err := x.ClientStream.SendMsg(in); err != nil {
  429. return nil, err
  430. }
  431. if err := x.ClientStream.CloseSend(); err != nil {
  432. return nil, err
  433. }
  434. return x, nil
  435. }
  436. type Logs_SubscribeLogsClient interface {
  437. Recv() (*SubscribeLogsMessage, error)
  438. grpc.ClientStream
  439. }
  440. type logsSubscribeLogsClient struct {
  441. grpc.ClientStream
  442. }
  443. func (x *logsSubscribeLogsClient) Recv() (*SubscribeLogsMessage, error) {
  444. m := new(SubscribeLogsMessage)
  445. if err := x.ClientStream.RecvMsg(m); err != nil {
  446. return nil, err
  447. }
  448. return m, nil
  449. }
  450. // Server API for Logs service
  451. type LogsServer interface {
  452. // SubscribeLogs starts a subscription with the specified selector and options.
  453. //
  454. // The subscription will be distributed to relevant nodes and messages will
  455. // be collected and sent via the returned stream.
  456. //
  457. // The subscription will end with an EOF.
  458. SubscribeLogs(*SubscribeLogsRequest, Logs_SubscribeLogsServer) error
  459. }
  460. func RegisterLogsServer(s *grpc.Server, srv LogsServer) {
  461. s.RegisterService(&_Logs_serviceDesc, srv)
  462. }
  463. func _Logs_SubscribeLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
  464. m := new(SubscribeLogsRequest)
  465. if err := stream.RecvMsg(m); err != nil {
  466. return err
  467. }
  468. return srv.(LogsServer).SubscribeLogs(m, &logsSubscribeLogsServer{stream})
  469. }
  470. type Logs_SubscribeLogsServer interface {
  471. Send(*SubscribeLogsMessage) error
  472. grpc.ServerStream
  473. }
  474. type logsSubscribeLogsServer struct {
  475. grpc.ServerStream
  476. }
  477. func (x *logsSubscribeLogsServer) Send(m *SubscribeLogsMessage) error {
  478. return x.ServerStream.SendMsg(m)
  479. }
  480. var _Logs_serviceDesc = grpc.ServiceDesc{
  481. ServiceName: "docker.swarmkit.v1.Logs",
  482. HandlerType: (*LogsServer)(nil),
  483. Methods: []grpc.MethodDesc{},
  484. Streams: []grpc.StreamDesc{
  485. {
  486. StreamName: "SubscribeLogs",
  487. Handler: _Logs_SubscribeLogs_Handler,
  488. ServerStreams: true,
  489. },
  490. },
  491. Metadata: "logbroker.proto",
  492. }
  493. // Client API for LogBroker service
  494. type LogBrokerClient interface {
  495. // ListenSubscriptions starts a subscription stream for the node. For each
  496. // message received, the node should attempt to satisfy the subscription.
  497. //
  498. // Log messages that match the provided subscription should be sent via
  499. // PublishLogs.
  500. ListenSubscriptions(ctx context.Context, in *ListenSubscriptionsRequest, opts ...grpc.CallOption) (LogBroker_ListenSubscriptionsClient, error)
  501. // PublishLogs receives sets of log messages destined for a single
  502. // subscription identifier.
  503. PublishLogs(ctx context.Context, opts ...grpc.CallOption) (LogBroker_PublishLogsClient, error)
  504. }
  505. type logBrokerClient struct {
  506. cc *grpc.ClientConn
  507. }
  508. func NewLogBrokerClient(cc *grpc.ClientConn) LogBrokerClient {
  509. return &logBrokerClient{cc}
  510. }
  511. func (c *logBrokerClient) ListenSubscriptions(ctx context.Context, in *ListenSubscriptionsRequest, opts ...grpc.CallOption) (LogBroker_ListenSubscriptionsClient, error) {
  512. stream, err := grpc.NewClientStream(ctx, &_LogBroker_serviceDesc.Streams[0], c.cc, "/docker.swarmkit.v1.LogBroker/ListenSubscriptions", opts...)
  513. if err != nil {
  514. return nil, err
  515. }
  516. x := &logBrokerListenSubscriptionsClient{stream}
  517. if err := x.ClientStream.SendMsg(in); err != nil {
  518. return nil, err
  519. }
  520. if err := x.ClientStream.CloseSend(); err != nil {
  521. return nil, err
  522. }
  523. return x, nil
  524. }
  525. type LogBroker_ListenSubscriptionsClient interface {
  526. Recv() (*SubscriptionMessage, error)
  527. grpc.ClientStream
  528. }
  529. type logBrokerListenSubscriptionsClient struct {
  530. grpc.ClientStream
  531. }
  532. func (x *logBrokerListenSubscriptionsClient) Recv() (*SubscriptionMessage, error) {
  533. m := new(SubscriptionMessage)
  534. if err := x.ClientStream.RecvMsg(m); err != nil {
  535. return nil, err
  536. }
  537. return m, nil
  538. }
  539. func (c *logBrokerClient) PublishLogs(ctx context.Context, opts ...grpc.CallOption) (LogBroker_PublishLogsClient, error) {
  540. stream, err := grpc.NewClientStream(ctx, &_LogBroker_serviceDesc.Streams[1], c.cc, "/docker.swarmkit.v1.LogBroker/PublishLogs", opts...)
  541. if err != nil {
  542. return nil, err
  543. }
  544. x := &logBrokerPublishLogsClient{stream}
  545. return x, nil
  546. }
  547. type LogBroker_PublishLogsClient interface {
  548. Send(*PublishLogsMessage) error
  549. CloseAndRecv() (*PublishLogsResponse, error)
  550. grpc.ClientStream
  551. }
  552. type logBrokerPublishLogsClient struct {
  553. grpc.ClientStream
  554. }
  555. func (x *logBrokerPublishLogsClient) Send(m *PublishLogsMessage) error {
  556. return x.ClientStream.SendMsg(m)
  557. }
  558. func (x *logBrokerPublishLogsClient) CloseAndRecv() (*PublishLogsResponse, error) {
  559. if err := x.ClientStream.CloseSend(); err != nil {
  560. return nil, err
  561. }
  562. m := new(PublishLogsResponse)
  563. if err := x.ClientStream.RecvMsg(m); err != nil {
  564. return nil, err
  565. }
  566. return m, nil
  567. }
  568. // Server API for LogBroker service
  569. type LogBrokerServer interface {
  570. // ListenSubscriptions starts a subscription stream for the node. For each
  571. // message received, the node should attempt to satisfy the subscription.
  572. //
  573. // Log messages that match the provided subscription should be sent via
  574. // PublishLogs.
  575. ListenSubscriptions(*ListenSubscriptionsRequest, LogBroker_ListenSubscriptionsServer) error
  576. // PublishLogs receives sets of log messages destined for a single
  577. // subscription identifier.
  578. PublishLogs(LogBroker_PublishLogsServer) error
  579. }
  580. func RegisterLogBrokerServer(s *grpc.Server, srv LogBrokerServer) {
  581. s.RegisterService(&_LogBroker_serviceDesc, srv)
  582. }
  583. func _LogBroker_ListenSubscriptions_Handler(srv interface{}, stream grpc.ServerStream) error {
  584. m := new(ListenSubscriptionsRequest)
  585. if err := stream.RecvMsg(m); err != nil {
  586. return err
  587. }
  588. return srv.(LogBrokerServer).ListenSubscriptions(m, &logBrokerListenSubscriptionsServer{stream})
  589. }
  590. type LogBroker_ListenSubscriptionsServer interface {
  591. Send(*SubscriptionMessage) error
  592. grpc.ServerStream
  593. }
  594. type logBrokerListenSubscriptionsServer struct {
  595. grpc.ServerStream
  596. }
  597. func (x *logBrokerListenSubscriptionsServer) Send(m *SubscriptionMessage) error {
  598. return x.ServerStream.SendMsg(m)
  599. }
  600. func _LogBroker_PublishLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
  601. return srv.(LogBrokerServer).PublishLogs(&logBrokerPublishLogsServer{stream})
  602. }
  603. type LogBroker_PublishLogsServer interface {
  604. SendAndClose(*PublishLogsResponse) error
  605. Recv() (*PublishLogsMessage, error)
  606. grpc.ServerStream
  607. }
  608. type logBrokerPublishLogsServer struct {
  609. grpc.ServerStream
  610. }
  611. func (x *logBrokerPublishLogsServer) SendAndClose(m *PublishLogsResponse) error {
  612. return x.ServerStream.SendMsg(m)
  613. }
  614. func (x *logBrokerPublishLogsServer) Recv() (*PublishLogsMessage, error) {
  615. m := new(PublishLogsMessage)
  616. if err := x.ServerStream.RecvMsg(m); err != nil {
  617. return nil, err
  618. }
  619. return m, nil
  620. }
  621. var _LogBroker_serviceDesc = grpc.ServiceDesc{
  622. ServiceName: "docker.swarmkit.v1.LogBroker",
  623. HandlerType: (*LogBrokerServer)(nil),
  624. Methods: []grpc.MethodDesc{},
  625. Streams: []grpc.StreamDesc{
  626. {
  627. StreamName: "ListenSubscriptions",
  628. Handler: _LogBroker_ListenSubscriptions_Handler,
  629. ServerStreams: true,
  630. },
  631. {
  632. StreamName: "PublishLogs",
  633. Handler: _LogBroker_PublishLogs_Handler,
  634. ClientStreams: true,
  635. },
  636. },
  637. Metadata: "logbroker.proto",
  638. }
  639. func (m *LogSubscriptionOptions) Marshal() (dAtA []byte, err error) {
  640. size := m.Size()
  641. dAtA = make([]byte, size)
  642. n, err := m.MarshalTo(dAtA)
  643. if err != nil {
  644. return nil, err
  645. }
  646. return dAtA[:n], nil
  647. }
  648. func (m *LogSubscriptionOptions) MarshalTo(dAtA []byte) (int, error) {
  649. var i int
  650. _ = i
  651. var l int
  652. _ = l
  653. if len(m.Streams) > 0 {
  654. dAtA2 := make([]byte, len(m.Streams)*10)
  655. var j1 int
  656. for _, num := range m.Streams {
  657. for num >= 1<<7 {
  658. dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
  659. num >>= 7
  660. j1++
  661. }
  662. dAtA2[j1] = uint8(num)
  663. j1++
  664. }
  665. dAtA[i] = 0xa
  666. i++
  667. i = encodeVarintLogbroker(dAtA, i, uint64(j1))
  668. i += copy(dAtA[i:], dAtA2[:j1])
  669. }
  670. if m.Follow {
  671. dAtA[i] = 0x10
  672. i++
  673. if m.Follow {
  674. dAtA[i] = 1
  675. } else {
  676. dAtA[i] = 0
  677. }
  678. i++
  679. }
  680. if m.Tail != 0 {
  681. dAtA[i] = 0x18
  682. i++
  683. i = encodeVarintLogbroker(dAtA, i, uint64(m.Tail))
  684. }
  685. if m.Since != nil {
  686. dAtA[i] = 0x22
  687. i++
  688. i = encodeVarintLogbroker(dAtA, i, uint64(m.Since.Size()))
  689. n3, err := m.Since.MarshalTo(dAtA[i:])
  690. if err != nil {
  691. return 0, err
  692. }
  693. i += n3
  694. }
  695. return i, nil
  696. }
  697. func (m *LogSelector) Marshal() (dAtA []byte, err error) {
  698. size := m.Size()
  699. dAtA = make([]byte, size)
  700. n, err := m.MarshalTo(dAtA)
  701. if err != nil {
  702. return nil, err
  703. }
  704. return dAtA[:n], nil
  705. }
  706. func (m *LogSelector) MarshalTo(dAtA []byte) (int, error) {
  707. var i int
  708. _ = i
  709. var l int
  710. _ = l
  711. if len(m.ServiceIDs) > 0 {
  712. for _, s := range m.ServiceIDs {
  713. dAtA[i] = 0xa
  714. i++
  715. l = len(s)
  716. for l >= 1<<7 {
  717. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  718. l >>= 7
  719. i++
  720. }
  721. dAtA[i] = uint8(l)
  722. i++
  723. i += copy(dAtA[i:], s)
  724. }
  725. }
  726. if len(m.NodeIDs) > 0 {
  727. for _, s := range m.NodeIDs {
  728. dAtA[i] = 0x12
  729. i++
  730. l = len(s)
  731. for l >= 1<<7 {
  732. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  733. l >>= 7
  734. i++
  735. }
  736. dAtA[i] = uint8(l)
  737. i++
  738. i += copy(dAtA[i:], s)
  739. }
  740. }
  741. if len(m.TaskIDs) > 0 {
  742. for _, s := range m.TaskIDs {
  743. dAtA[i] = 0x1a
  744. i++
  745. l = len(s)
  746. for l >= 1<<7 {
  747. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  748. l >>= 7
  749. i++
  750. }
  751. dAtA[i] = uint8(l)
  752. i++
  753. i += copy(dAtA[i:], s)
  754. }
  755. }
  756. return i, nil
  757. }
  758. func (m *LogContext) Marshal() (dAtA []byte, err error) {
  759. size := m.Size()
  760. dAtA = make([]byte, size)
  761. n, err := m.MarshalTo(dAtA)
  762. if err != nil {
  763. return nil, err
  764. }
  765. return dAtA[:n], nil
  766. }
  767. func (m *LogContext) MarshalTo(dAtA []byte) (int, error) {
  768. var i int
  769. _ = i
  770. var l int
  771. _ = l
  772. if len(m.ServiceID) > 0 {
  773. dAtA[i] = 0xa
  774. i++
  775. i = encodeVarintLogbroker(dAtA, i, uint64(len(m.ServiceID)))
  776. i += copy(dAtA[i:], m.ServiceID)
  777. }
  778. if len(m.NodeID) > 0 {
  779. dAtA[i] = 0x12
  780. i++
  781. i = encodeVarintLogbroker(dAtA, i, uint64(len(m.NodeID)))
  782. i += copy(dAtA[i:], m.NodeID)
  783. }
  784. if len(m.TaskID) > 0 {
  785. dAtA[i] = 0x1a
  786. i++
  787. i = encodeVarintLogbroker(dAtA, i, uint64(len(m.TaskID)))
  788. i += copy(dAtA[i:], m.TaskID)
  789. }
  790. return i, nil
  791. }
  792. func (m *LogMessage) Marshal() (dAtA []byte, err error) {
  793. size := m.Size()
  794. dAtA = make([]byte, size)
  795. n, err := m.MarshalTo(dAtA)
  796. if err != nil {
  797. return nil, err
  798. }
  799. return dAtA[:n], nil
  800. }
  801. func (m *LogMessage) MarshalTo(dAtA []byte) (int, error) {
  802. var i int
  803. _ = i
  804. var l int
  805. _ = l
  806. dAtA[i] = 0xa
  807. i++
  808. i = encodeVarintLogbroker(dAtA, i, uint64(m.Context.Size()))
  809. n4, err := m.Context.MarshalTo(dAtA[i:])
  810. if err != nil {
  811. return 0, err
  812. }
  813. i += n4
  814. if m.Timestamp != nil {
  815. dAtA[i] = 0x12
  816. i++
  817. i = encodeVarintLogbroker(dAtA, i, uint64(m.Timestamp.Size()))
  818. n5, err := m.Timestamp.MarshalTo(dAtA[i:])
  819. if err != nil {
  820. return 0, err
  821. }
  822. i += n5
  823. }
  824. if m.Stream != 0 {
  825. dAtA[i] = 0x18
  826. i++
  827. i = encodeVarintLogbroker(dAtA, i, uint64(m.Stream))
  828. }
  829. if len(m.Data) > 0 {
  830. dAtA[i] = 0x22
  831. i++
  832. i = encodeVarintLogbroker(dAtA, i, uint64(len(m.Data)))
  833. i += copy(dAtA[i:], m.Data)
  834. }
  835. return i, nil
  836. }
  837. func (m *SubscribeLogsRequest) Marshal() (dAtA []byte, err error) {
  838. size := m.Size()
  839. dAtA = make([]byte, size)
  840. n, err := m.MarshalTo(dAtA)
  841. if err != nil {
  842. return nil, err
  843. }
  844. return dAtA[:n], nil
  845. }
  846. func (m *SubscribeLogsRequest) MarshalTo(dAtA []byte) (int, error) {
  847. var i int
  848. _ = i
  849. var l int
  850. _ = l
  851. if m.Selector != nil {
  852. dAtA[i] = 0xa
  853. i++
  854. i = encodeVarintLogbroker(dAtA, i, uint64(m.Selector.Size()))
  855. n6, err := m.Selector.MarshalTo(dAtA[i:])
  856. if err != nil {
  857. return 0, err
  858. }
  859. i += n6
  860. }
  861. if m.Options != nil {
  862. dAtA[i] = 0x12
  863. i++
  864. i = encodeVarintLogbroker(dAtA, i, uint64(m.Options.Size()))
  865. n7, err := m.Options.MarshalTo(dAtA[i:])
  866. if err != nil {
  867. return 0, err
  868. }
  869. i += n7
  870. }
  871. return i, nil
  872. }
  873. func (m *SubscribeLogsMessage) Marshal() (dAtA []byte, err error) {
  874. size := m.Size()
  875. dAtA = make([]byte, size)
  876. n, err := m.MarshalTo(dAtA)
  877. if err != nil {
  878. return nil, err
  879. }
  880. return dAtA[:n], nil
  881. }
  882. func (m *SubscribeLogsMessage) MarshalTo(dAtA []byte) (int, error) {
  883. var i int
  884. _ = i
  885. var l int
  886. _ = l
  887. if len(m.Messages) > 0 {
  888. for _, msg := range m.Messages {
  889. dAtA[i] = 0xa
  890. i++
  891. i = encodeVarintLogbroker(dAtA, i, uint64(msg.Size()))
  892. n, err := msg.MarshalTo(dAtA[i:])
  893. if err != nil {
  894. return 0, err
  895. }
  896. i += n
  897. }
  898. }
  899. return i, nil
  900. }
  901. func (m *ListenSubscriptionsRequest) Marshal() (dAtA []byte, err error) {
  902. size := m.Size()
  903. dAtA = make([]byte, size)
  904. n, err := m.MarshalTo(dAtA)
  905. if err != nil {
  906. return nil, err
  907. }
  908. return dAtA[:n], nil
  909. }
  910. func (m *ListenSubscriptionsRequest) MarshalTo(dAtA []byte) (int, error) {
  911. var i int
  912. _ = i
  913. var l int
  914. _ = l
  915. return i, nil
  916. }
  917. func (m *SubscriptionMessage) Marshal() (dAtA []byte, err error) {
  918. size := m.Size()
  919. dAtA = make([]byte, size)
  920. n, err := m.MarshalTo(dAtA)
  921. if err != nil {
  922. return nil, err
  923. }
  924. return dAtA[:n], nil
  925. }
  926. func (m *SubscriptionMessage) MarshalTo(dAtA []byte) (int, error) {
  927. var i int
  928. _ = i
  929. var l int
  930. _ = l
  931. if len(m.ID) > 0 {
  932. dAtA[i] = 0xa
  933. i++
  934. i = encodeVarintLogbroker(dAtA, i, uint64(len(m.ID)))
  935. i += copy(dAtA[i:], m.ID)
  936. }
  937. if m.Selector != nil {
  938. dAtA[i] = 0x12
  939. i++
  940. i = encodeVarintLogbroker(dAtA, i, uint64(m.Selector.Size()))
  941. n8, err := m.Selector.MarshalTo(dAtA[i:])
  942. if err != nil {
  943. return 0, err
  944. }
  945. i += n8
  946. }
  947. if m.Options != nil {
  948. dAtA[i] = 0x1a
  949. i++
  950. i = encodeVarintLogbroker(dAtA, i, uint64(m.Options.Size()))
  951. n9, err := m.Options.MarshalTo(dAtA[i:])
  952. if err != nil {
  953. return 0, err
  954. }
  955. i += n9
  956. }
  957. if m.Close {
  958. dAtA[i] = 0x20
  959. i++
  960. if m.Close {
  961. dAtA[i] = 1
  962. } else {
  963. dAtA[i] = 0
  964. }
  965. i++
  966. }
  967. return i, nil
  968. }
  969. func (m *PublishLogsMessage) Marshal() (dAtA []byte, err error) {
  970. size := m.Size()
  971. dAtA = make([]byte, size)
  972. n, err := m.MarshalTo(dAtA)
  973. if err != nil {
  974. return nil, err
  975. }
  976. return dAtA[:n], nil
  977. }
  978. func (m *PublishLogsMessage) MarshalTo(dAtA []byte) (int, error) {
  979. var i int
  980. _ = i
  981. var l int
  982. _ = l
  983. if len(m.SubscriptionID) > 0 {
  984. dAtA[i] = 0xa
  985. i++
  986. i = encodeVarintLogbroker(dAtA, i, uint64(len(m.SubscriptionID)))
  987. i += copy(dAtA[i:], m.SubscriptionID)
  988. }
  989. if len(m.Messages) > 0 {
  990. for _, msg := range m.Messages {
  991. dAtA[i] = 0x12
  992. i++
  993. i = encodeVarintLogbroker(dAtA, i, uint64(msg.Size()))
  994. n, err := msg.MarshalTo(dAtA[i:])
  995. if err != nil {
  996. return 0, err
  997. }
  998. i += n
  999. }
  1000. }
  1001. if m.Close {
  1002. dAtA[i] = 0x18
  1003. i++
  1004. if m.Close {
  1005. dAtA[i] = 1
  1006. } else {
  1007. dAtA[i] = 0
  1008. }
  1009. i++
  1010. }
  1011. return i, nil
  1012. }
  1013. func (m *PublishLogsResponse) Marshal() (dAtA []byte, err error) {
  1014. size := m.Size()
  1015. dAtA = make([]byte, size)
  1016. n, err := m.MarshalTo(dAtA)
  1017. if err != nil {
  1018. return nil, err
  1019. }
  1020. return dAtA[:n], nil
  1021. }
  1022. func (m *PublishLogsResponse) MarshalTo(dAtA []byte) (int, error) {
  1023. var i int
  1024. _ = i
  1025. var l int
  1026. _ = l
  1027. return i, nil
  1028. }
  1029. func encodeFixed64Logbroker(dAtA []byte, offset int, v uint64) int {
  1030. dAtA[offset] = uint8(v)
  1031. dAtA[offset+1] = uint8(v >> 8)
  1032. dAtA[offset+2] = uint8(v >> 16)
  1033. dAtA[offset+3] = uint8(v >> 24)
  1034. dAtA[offset+4] = uint8(v >> 32)
  1035. dAtA[offset+5] = uint8(v >> 40)
  1036. dAtA[offset+6] = uint8(v >> 48)
  1037. dAtA[offset+7] = uint8(v >> 56)
  1038. return offset + 8
  1039. }
  1040. func encodeFixed32Logbroker(dAtA []byte, offset int, v uint32) int {
  1041. dAtA[offset] = uint8(v)
  1042. dAtA[offset+1] = uint8(v >> 8)
  1043. dAtA[offset+2] = uint8(v >> 16)
  1044. dAtA[offset+3] = uint8(v >> 24)
  1045. return offset + 4
  1046. }
  1047. func encodeVarintLogbroker(dAtA []byte, offset int, v uint64) int {
  1048. for v >= 1<<7 {
  1049. dAtA[offset] = uint8(v&0x7f | 0x80)
  1050. v >>= 7
  1051. offset++
  1052. }
  1053. dAtA[offset] = uint8(v)
  1054. return offset + 1
  1055. }
  1056. type raftProxyLogsServer struct {
  1057. local LogsServer
  1058. connSelector raftselector.ConnProvider
  1059. localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
  1060. }
  1061. func NewRaftProxyLogsServer(local LogsServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) LogsServer {
  1062. redirectChecker := func(ctx context.Context) (context.Context, error) {
  1063. s, ok := transport.StreamFromContext(ctx)
  1064. if !ok {
  1065. return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
  1066. }
  1067. addr := s.ServerTransport().RemoteAddr().String()
  1068. md, ok := metadata.FromContext(ctx)
  1069. if ok && len(md["redirect"]) != 0 {
  1070. return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
  1071. }
  1072. if !ok {
  1073. md = metadata.New(map[string]string{})
  1074. }
  1075. md["redirect"] = append(md["redirect"], addr)
  1076. return metadata.NewContext(ctx, md), nil
  1077. }
  1078. remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
  1079. remoteMods = append(remoteMods, remoteCtxMod)
  1080. var localMods []func(context.Context) (context.Context, error)
  1081. if localCtxMod != nil {
  1082. localMods = []func(context.Context) (context.Context, error){localCtxMod}
  1083. }
  1084. return &raftProxyLogsServer{
  1085. local: local,
  1086. connSelector: connSelector,
  1087. localCtxMods: localMods,
  1088. remoteCtxMods: remoteMods,
  1089. }
  1090. }
  1091. func (p *raftProxyLogsServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
  1092. var err error
  1093. for _, mod := range ctxMods {
  1094. ctx, err = mod(ctx)
  1095. if err != nil {
  1096. return ctx, err
  1097. }
  1098. }
  1099. return ctx, nil
  1100. }
  1101. func (p *raftProxyLogsServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
  1102. ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
  1103. defer ticker.Stop()
  1104. for {
  1105. select {
  1106. case <-ticker.C:
  1107. conn, err := p.connSelector.LeaderConn(ctx)
  1108. if err != nil {
  1109. return nil, err
  1110. }
  1111. client := NewHealthClient(conn)
  1112. resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
  1113. if err != nil || resp.Status != HealthCheckResponse_SERVING {
  1114. continue
  1115. }
  1116. return conn, nil
  1117. case <-ctx.Done():
  1118. return nil, ctx.Err()
  1119. }
  1120. }
  1121. }
  1122. type Logs_SubscribeLogsServerWrapper struct {
  1123. Logs_SubscribeLogsServer
  1124. ctx context.Context
  1125. }
  1126. func (s Logs_SubscribeLogsServerWrapper) Context() context.Context {
  1127. return s.ctx
  1128. }
  1129. func (p *raftProxyLogsServer) SubscribeLogs(r *SubscribeLogsRequest, stream Logs_SubscribeLogsServer) error {
  1130. ctx := stream.Context()
  1131. conn, err := p.connSelector.LeaderConn(ctx)
  1132. if err != nil {
  1133. if err == raftselector.ErrIsLeader {
  1134. ctx, err = p.runCtxMods(ctx, p.localCtxMods)
  1135. if err != nil {
  1136. return err
  1137. }
  1138. streamWrapper := Logs_SubscribeLogsServerWrapper{
  1139. Logs_SubscribeLogsServer: stream,
  1140. ctx: ctx,
  1141. }
  1142. return p.local.SubscribeLogs(r, streamWrapper)
  1143. }
  1144. return err
  1145. }
  1146. ctx, err = p.runCtxMods(ctx, p.remoteCtxMods)
  1147. if err != nil {
  1148. return err
  1149. }
  1150. clientStream, err := NewLogsClient(conn).SubscribeLogs(ctx, r)
  1151. if err != nil {
  1152. return err
  1153. }
  1154. for {
  1155. msg, err := clientStream.Recv()
  1156. if err == io.EOF {
  1157. break
  1158. }
  1159. if err != nil {
  1160. return err
  1161. }
  1162. if err := stream.Send(msg); err != nil {
  1163. return err
  1164. }
  1165. }
  1166. return nil
  1167. }
  1168. type raftProxyLogBrokerServer struct {
  1169. local LogBrokerServer
  1170. connSelector raftselector.ConnProvider
  1171. localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
  1172. }
  1173. func NewRaftProxyLogBrokerServer(local LogBrokerServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) LogBrokerServer {
  1174. redirectChecker := func(ctx context.Context) (context.Context, error) {
  1175. s, ok := transport.StreamFromContext(ctx)
  1176. if !ok {
  1177. return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
  1178. }
  1179. addr := s.ServerTransport().RemoteAddr().String()
  1180. md, ok := metadata.FromContext(ctx)
  1181. if ok && len(md["redirect"]) != 0 {
  1182. return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
  1183. }
  1184. if !ok {
  1185. md = metadata.New(map[string]string{})
  1186. }
  1187. md["redirect"] = append(md["redirect"], addr)
  1188. return metadata.NewContext(ctx, md), nil
  1189. }
  1190. remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
  1191. remoteMods = append(remoteMods, remoteCtxMod)
  1192. var localMods []func(context.Context) (context.Context, error)
  1193. if localCtxMod != nil {
  1194. localMods = []func(context.Context) (context.Context, error){localCtxMod}
  1195. }
  1196. return &raftProxyLogBrokerServer{
  1197. local: local,
  1198. connSelector: connSelector,
  1199. localCtxMods: localMods,
  1200. remoteCtxMods: remoteMods,
  1201. }
  1202. }
  1203. func (p *raftProxyLogBrokerServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
  1204. var err error
  1205. for _, mod := range ctxMods {
  1206. ctx, err = mod(ctx)
  1207. if err != nil {
  1208. return ctx, err
  1209. }
  1210. }
  1211. return ctx, nil
  1212. }
  1213. func (p *raftProxyLogBrokerServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
  1214. ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
  1215. defer ticker.Stop()
  1216. for {
  1217. select {
  1218. case <-ticker.C:
  1219. conn, err := p.connSelector.LeaderConn(ctx)
  1220. if err != nil {
  1221. return nil, err
  1222. }
  1223. client := NewHealthClient(conn)
  1224. resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
  1225. if err != nil || resp.Status != HealthCheckResponse_SERVING {
  1226. continue
  1227. }
  1228. return conn, nil
  1229. case <-ctx.Done():
  1230. return nil, ctx.Err()
  1231. }
  1232. }
  1233. }
  1234. type LogBroker_ListenSubscriptionsServerWrapper struct {
  1235. LogBroker_ListenSubscriptionsServer
  1236. ctx context.Context
  1237. }
  1238. func (s LogBroker_ListenSubscriptionsServerWrapper) Context() context.Context {
  1239. return s.ctx
  1240. }
  1241. func (p *raftProxyLogBrokerServer) ListenSubscriptions(r *ListenSubscriptionsRequest, stream LogBroker_ListenSubscriptionsServer) error {
  1242. ctx := stream.Context()
  1243. conn, err := p.connSelector.LeaderConn(ctx)
  1244. if err != nil {
  1245. if err == raftselector.ErrIsLeader {
  1246. ctx, err = p.runCtxMods(ctx, p.localCtxMods)
  1247. if err != nil {
  1248. return err
  1249. }
  1250. streamWrapper := LogBroker_ListenSubscriptionsServerWrapper{
  1251. LogBroker_ListenSubscriptionsServer: stream,
  1252. ctx: ctx,
  1253. }
  1254. return p.local.ListenSubscriptions(r, streamWrapper)
  1255. }
  1256. return err
  1257. }
  1258. ctx, err = p.runCtxMods(ctx, p.remoteCtxMods)
  1259. if err != nil {
  1260. return err
  1261. }
  1262. clientStream, err := NewLogBrokerClient(conn).ListenSubscriptions(ctx, r)
  1263. if err != nil {
  1264. return err
  1265. }
  1266. for {
  1267. msg, err := clientStream.Recv()
  1268. if err == io.EOF {
  1269. break
  1270. }
  1271. if err != nil {
  1272. return err
  1273. }
  1274. if err := stream.Send(msg); err != nil {
  1275. return err
  1276. }
  1277. }
  1278. return nil
  1279. }
  1280. type LogBroker_PublishLogsServerWrapper struct {
  1281. LogBroker_PublishLogsServer
  1282. ctx context.Context
  1283. }
  1284. func (s LogBroker_PublishLogsServerWrapper) Context() context.Context {
  1285. return s.ctx
  1286. }
  1287. func (p *raftProxyLogBrokerServer) PublishLogs(stream LogBroker_PublishLogsServer) error {
  1288. ctx := stream.Context()
  1289. conn, err := p.connSelector.LeaderConn(ctx)
  1290. if err != nil {
  1291. if err == raftselector.ErrIsLeader {
  1292. ctx, err = p.runCtxMods(ctx, p.localCtxMods)
  1293. if err != nil {
  1294. return err
  1295. }
  1296. streamWrapper := LogBroker_PublishLogsServerWrapper{
  1297. LogBroker_PublishLogsServer: stream,
  1298. ctx: ctx,
  1299. }
  1300. return p.local.PublishLogs(streamWrapper)
  1301. }
  1302. return err
  1303. }
  1304. ctx, err = p.runCtxMods(ctx, p.remoteCtxMods)
  1305. if err != nil {
  1306. return err
  1307. }
  1308. clientStream, err := NewLogBrokerClient(conn).PublishLogs(ctx)
  1309. if err != nil {
  1310. return err
  1311. }
  1312. for {
  1313. msg, err := stream.Recv()
  1314. if err == io.EOF {
  1315. break
  1316. }
  1317. if err != nil {
  1318. return err
  1319. }
  1320. if err := clientStream.Send(msg); err != nil {
  1321. return err
  1322. }
  1323. }
  1324. reply, err := clientStream.CloseAndRecv()
  1325. if err != nil {
  1326. return err
  1327. }
  1328. return stream.SendAndClose(reply)
  1329. }
  1330. func (m *LogSubscriptionOptions) Size() (n int) {
  1331. var l int
  1332. _ = l
  1333. if len(m.Streams) > 0 {
  1334. l = 0
  1335. for _, e := range m.Streams {
  1336. l += sovLogbroker(uint64(e))
  1337. }
  1338. n += 1 + sovLogbroker(uint64(l)) + l
  1339. }
  1340. if m.Follow {
  1341. n += 2
  1342. }
  1343. if m.Tail != 0 {
  1344. n += 1 + sovLogbroker(uint64(m.Tail))
  1345. }
  1346. if m.Since != nil {
  1347. l = m.Since.Size()
  1348. n += 1 + l + sovLogbroker(uint64(l))
  1349. }
  1350. return n
  1351. }
  1352. func (m *LogSelector) Size() (n int) {
  1353. var l int
  1354. _ = l
  1355. if len(m.ServiceIDs) > 0 {
  1356. for _, s := range m.ServiceIDs {
  1357. l = len(s)
  1358. n += 1 + l + sovLogbroker(uint64(l))
  1359. }
  1360. }
  1361. if len(m.NodeIDs) > 0 {
  1362. for _, s := range m.NodeIDs {
  1363. l = len(s)
  1364. n += 1 + l + sovLogbroker(uint64(l))
  1365. }
  1366. }
  1367. if len(m.TaskIDs) > 0 {
  1368. for _, s := range m.TaskIDs {
  1369. l = len(s)
  1370. n += 1 + l + sovLogbroker(uint64(l))
  1371. }
  1372. }
  1373. return n
  1374. }
  1375. func (m *LogContext) Size() (n int) {
  1376. var l int
  1377. _ = l
  1378. l = len(m.ServiceID)
  1379. if l > 0 {
  1380. n += 1 + l + sovLogbroker(uint64(l))
  1381. }
  1382. l = len(m.NodeID)
  1383. if l > 0 {
  1384. n += 1 + l + sovLogbroker(uint64(l))
  1385. }
  1386. l = len(m.TaskID)
  1387. if l > 0 {
  1388. n += 1 + l + sovLogbroker(uint64(l))
  1389. }
  1390. return n
  1391. }
  1392. func (m *LogMessage) Size() (n int) {
  1393. var l int
  1394. _ = l
  1395. l = m.Context.Size()
  1396. n += 1 + l + sovLogbroker(uint64(l))
  1397. if m.Timestamp != nil {
  1398. l = m.Timestamp.Size()
  1399. n += 1 + l + sovLogbroker(uint64(l))
  1400. }
  1401. if m.Stream != 0 {
  1402. n += 1 + sovLogbroker(uint64(m.Stream))
  1403. }
  1404. l = len(m.Data)
  1405. if l > 0 {
  1406. n += 1 + l + sovLogbroker(uint64(l))
  1407. }
  1408. return n
  1409. }
  1410. func (m *SubscribeLogsRequest) Size() (n int) {
  1411. var l int
  1412. _ = l
  1413. if m.Selector != nil {
  1414. l = m.Selector.Size()
  1415. n += 1 + l + sovLogbroker(uint64(l))
  1416. }
  1417. if m.Options != nil {
  1418. l = m.Options.Size()
  1419. n += 1 + l + sovLogbroker(uint64(l))
  1420. }
  1421. return n
  1422. }
  1423. func (m *SubscribeLogsMessage) Size() (n int) {
  1424. var l int
  1425. _ = l
  1426. if len(m.Messages) > 0 {
  1427. for _, e := range m.Messages {
  1428. l = e.Size()
  1429. n += 1 + l + sovLogbroker(uint64(l))
  1430. }
  1431. }
  1432. return n
  1433. }
  1434. func (m *ListenSubscriptionsRequest) Size() (n int) {
  1435. var l int
  1436. _ = l
  1437. return n
  1438. }
  1439. func (m *SubscriptionMessage) Size() (n int) {
  1440. var l int
  1441. _ = l
  1442. l = len(m.ID)
  1443. if l > 0 {
  1444. n += 1 + l + sovLogbroker(uint64(l))
  1445. }
  1446. if m.Selector != nil {
  1447. l = m.Selector.Size()
  1448. n += 1 + l + sovLogbroker(uint64(l))
  1449. }
  1450. if m.Options != nil {
  1451. l = m.Options.Size()
  1452. n += 1 + l + sovLogbroker(uint64(l))
  1453. }
  1454. if m.Close {
  1455. n += 2
  1456. }
  1457. return n
  1458. }
  1459. func (m *PublishLogsMessage) Size() (n int) {
  1460. var l int
  1461. _ = l
  1462. l = len(m.SubscriptionID)
  1463. if l > 0 {
  1464. n += 1 + l + sovLogbroker(uint64(l))
  1465. }
  1466. if len(m.Messages) > 0 {
  1467. for _, e := range m.Messages {
  1468. l = e.Size()
  1469. n += 1 + l + sovLogbroker(uint64(l))
  1470. }
  1471. }
  1472. if m.Close {
  1473. n += 2
  1474. }
  1475. return n
  1476. }
  1477. func (m *PublishLogsResponse) Size() (n int) {
  1478. var l int
  1479. _ = l
  1480. return n
  1481. }
  1482. func sovLogbroker(x uint64) (n int) {
  1483. for {
  1484. n++
  1485. x >>= 7
  1486. if x == 0 {
  1487. break
  1488. }
  1489. }
  1490. return n
  1491. }
  1492. func sozLogbroker(x uint64) (n int) {
  1493. return sovLogbroker(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1494. }
  1495. func (this *LogSubscriptionOptions) String() string {
  1496. if this == nil {
  1497. return "nil"
  1498. }
  1499. s := strings.Join([]string{`&LogSubscriptionOptions{`,
  1500. `Streams:` + fmt.Sprintf("%v", this.Streams) + `,`,
  1501. `Follow:` + fmt.Sprintf("%v", this.Follow) + `,`,
  1502. `Tail:` + fmt.Sprintf("%v", this.Tail) + `,`,
  1503. `Since:` + strings.Replace(fmt.Sprintf("%v", this.Since), "Timestamp", "google_protobuf.Timestamp", 1) + `,`,
  1504. `}`,
  1505. }, "")
  1506. return s
  1507. }
  1508. func (this *LogSelector) String() string {
  1509. if this == nil {
  1510. return "nil"
  1511. }
  1512. s := strings.Join([]string{`&LogSelector{`,
  1513. `ServiceIDs:` + fmt.Sprintf("%v", this.ServiceIDs) + `,`,
  1514. `NodeIDs:` + fmt.Sprintf("%v", this.NodeIDs) + `,`,
  1515. `TaskIDs:` + fmt.Sprintf("%v", this.TaskIDs) + `,`,
  1516. `}`,
  1517. }, "")
  1518. return s
  1519. }
  1520. func (this *LogContext) String() string {
  1521. if this == nil {
  1522. return "nil"
  1523. }
  1524. s := strings.Join([]string{`&LogContext{`,
  1525. `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
  1526. `NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
  1527. `TaskID:` + fmt.Sprintf("%v", this.TaskID) + `,`,
  1528. `}`,
  1529. }, "")
  1530. return s
  1531. }
  1532. func (this *LogMessage) String() string {
  1533. if this == nil {
  1534. return "nil"
  1535. }
  1536. s := strings.Join([]string{`&LogMessage{`,
  1537. `Context:` + strings.Replace(strings.Replace(this.Context.String(), "LogContext", "LogContext", 1), `&`, ``, 1) + `,`,
  1538. `Timestamp:` + strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "google_protobuf.Timestamp", 1) + `,`,
  1539. `Stream:` + fmt.Sprintf("%v", this.Stream) + `,`,
  1540. `Data:` + fmt.Sprintf("%v", this.Data) + `,`,
  1541. `}`,
  1542. }, "")
  1543. return s
  1544. }
  1545. func (this *SubscribeLogsRequest) String() string {
  1546. if this == nil {
  1547. return "nil"
  1548. }
  1549. s := strings.Join([]string{`&SubscribeLogsRequest{`,
  1550. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LogSelector", "LogSelector", 1) + `,`,
  1551. `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "LogSubscriptionOptions", "LogSubscriptionOptions", 1) + `,`,
  1552. `}`,
  1553. }, "")
  1554. return s
  1555. }
  1556. func (this *SubscribeLogsMessage) String() string {
  1557. if this == nil {
  1558. return "nil"
  1559. }
  1560. s := strings.Join([]string{`&SubscribeLogsMessage{`,
  1561. `Messages:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Messages), "LogMessage", "LogMessage", 1), `&`, ``, 1) + `,`,
  1562. `}`,
  1563. }, "")
  1564. return s
  1565. }
  1566. func (this *ListenSubscriptionsRequest) String() string {
  1567. if this == nil {
  1568. return "nil"
  1569. }
  1570. s := strings.Join([]string{`&ListenSubscriptionsRequest{`,
  1571. `}`,
  1572. }, "")
  1573. return s
  1574. }
  1575. func (this *SubscriptionMessage) String() string {
  1576. if this == nil {
  1577. return "nil"
  1578. }
  1579. s := strings.Join([]string{`&SubscriptionMessage{`,
  1580. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1581. `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LogSelector", "LogSelector", 1) + `,`,
  1582. `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "LogSubscriptionOptions", "LogSubscriptionOptions", 1) + `,`,
  1583. `Close:` + fmt.Sprintf("%v", this.Close) + `,`,
  1584. `}`,
  1585. }, "")
  1586. return s
  1587. }
  1588. func (this *PublishLogsMessage) String() string {
  1589. if this == nil {
  1590. return "nil"
  1591. }
  1592. s := strings.Join([]string{`&PublishLogsMessage{`,
  1593. `SubscriptionID:` + fmt.Sprintf("%v", this.SubscriptionID) + `,`,
  1594. `Messages:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Messages), "LogMessage", "LogMessage", 1), `&`, ``, 1) + `,`,
  1595. `Close:` + fmt.Sprintf("%v", this.Close) + `,`,
  1596. `}`,
  1597. }, "")
  1598. return s
  1599. }
  1600. func (this *PublishLogsResponse) String() string {
  1601. if this == nil {
  1602. return "nil"
  1603. }
  1604. s := strings.Join([]string{`&PublishLogsResponse{`,
  1605. `}`,
  1606. }, "")
  1607. return s
  1608. }
  1609. func valueToStringLogbroker(v interface{}) string {
  1610. rv := reflect.ValueOf(v)
  1611. if rv.IsNil() {
  1612. return "nil"
  1613. }
  1614. pv := reflect.Indirect(rv).Interface()
  1615. return fmt.Sprintf("*%v", pv)
  1616. }
  1617. func (m *LogSubscriptionOptions) Unmarshal(dAtA []byte) error {
  1618. l := len(dAtA)
  1619. iNdEx := 0
  1620. for iNdEx < l {
  1621. preIndex := iNdEx
  1622. var wire uint64
  1623. for shift := uint(0); ; shift += 7 {
  1624. if shift >= 64 {
  1625. return ErrIntOverflowLogbroker
  1626. }
  1627. if iNdEx >= l {
  1628. return io.ErrUnexpectedEOF
  1629. }
  1630. b := dAtA[iNdEx]
  1631. iNdEx++
  1632. wire |= (uint64(b) & 0x7F) << shift
  1633. if b < 0x80 {
  1634. break
  1635. }
  1636. }
  1637. fieldNum := int32(wire >> 3)
  1638. wireType := int(wire & 0x7)
  1639. if wireType == 4 {
  1640. return fmt.Errorf("proto: LogSubscriptionOptions: wiretype end group for non-group")
  1641. }
  1642. if fieldNum <= 0 {
  1643. return fmt.Errorf("proto: LogSubscriptionOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  1644. }
  1645. switch fieldNum {
  1646. case 1:
  1647. if wireType == 2 {
  1648. var packedLen int
  1649. for shift := uint(0); ; shift += 7 {
  1650. if shift >= 64 {
  1651. return ErrIntOverflowLogbroker
  1652. }
  1653. if iNdEx >= l {
  1654. return io.ErrUnexpectedEOF
  1655. }
  1656. b := dAtA[iNdEx]
  1657. iNdEx++
  1658. packedLen |= (int(b) & 0x7F) << shift
  1659. if b < 0x80 {
  1660. break
  1661. }
  1662. }
  1663. if packedLen < 0 {
  1664. return ErrInvalidLengthLogbroker
  1665. }
  1666. postIndex := iNdEx + packedLen
  1667. if postIndex > l {
  1668. return io.ErrUnexpectedEOF
  1669. }
  1670. for iNdEx < postIndex {
  1671. var v LogStream
  1672. for shift := uint(0); ; shift += 7 {
  1673. if shift >= 64 {
  1674. return ErrIntOverflowLogbroker
  1675. }
  1676. if iNdEx >= l {
  1677. return io.ErrUnexpectedEOF
  1678. }
  1679. b := dAtA[iNdEx]
  1680. iNdEx++
  1681. v |= (LogStream(b) & 0x7F) << shift
  1682. if b < 0x80 {
  1683. break
  1684. }
  1685. }
  1686. m.Streams = append(m.Streams, v)
  1687. }
  1688. } else if wireType == 0 {
  1689. var v LogStream
  1690. for shift := uint(0); ; shift += 7 {
  1691. if shift >= 64 {
  1692. return ErrIntOverflowLogbroker
  1693. }
  1694. if iNdEx >= l {
  1695. return io.ErrUnexpectedEOF
  1696. }
  1697. b := dAtA[iNdEx]
  1698. iNdEx++
  1699. v |= (LogStream(b) & 0x7F) << shift
  1700. if b < 0x80 {
  1701. break
  1702. }
  1703. }
  1704. m.Streams = append(m.Streams, v)
  1705. } else {
  1706. return fmt.Errorf("proto: wrong wireType = %d for field Streams", wireType)
  1707. }
  1708. case 2:
  1709. if wireType != 0 {
  1710. return fmt.Errorf("proto: wrong wireType = %d for field Follow", wireType)
  1711. }
  1712. var v int
  1713. for shift := uint(0); ; shift += 7 {
  1714. if shift >= 64 {
  1715. return ErrIntOverflowLogbroker
  1716. }
  1717. if iNdEx >= l {
  1718. return io.ErrUnexpectedEOF
  1719. }
  1720. b := dAtA[iNdEx]
  1721. iNdEx++
  1722. v |= (int(b) & 0x7F) << shift
  1723. if b < 0x80 {
  1724. break
  1725. }
  1726. }
  1727. m.Follow = bool(v != 0)
  1728. case 3:
  1729. if wireType != 0 {
  1730. return fmt.Errorf("proto: wrong wireType = %d for field Tail", wireType)
  1731. }
  1732. m.Tail = 0
  1733. for shift := uint(0); ; shift += 7 {
  1734. if shift >= 64 {
  1735. return ErrIntOverflowLogbroker
  1736. }
  1737. if iNdEx >= l {
  1738. return io.ErrUnexpectedEOF
  1739. }
  1740. b := dAtA[iNdEx]
  1741. iNdEx++
  1742. m.Tail |= (int64(b) & 0x7F) << shift
  1743. if b < 0x80 {
  1744. break
  1745. }
  1746. }
  1747. case 4:
  1748. if wireType != 2 {
  1749. return fmt.Errorf("proto: wrong wireType = %d for field Since", wireType)
  1750. }
  1751. var msglen int
  1752. for shift := uint(0); ; shift += 7 {
  1753. if shift >= 64 {
  1754. return ErrIntOverflowLogbroker
  1755. }
  1756. if iNdEx >= l {
  1757. return io.ErrUnexpectedEOF
  1758. }
  1759. b := dAtA[iNdEx]
  1760. iNdEx++
  1761. msglen |= (int(b) & 0x7F) << shift
  1762. if b < 0x80 {
  1763. break
  1764. }
  1765. }
  1766. if msglen < 0 {
  1767. return ErrInvalidLengthLogbroker
  1768. }
  1769. postIndex := iNdEx + msglen
  1770. if postIndex > l {
  1771. return io.ErrUnexpectedEOF
  1772. }
  1773. if m.Since == nil {
  1774. m.Since = &google_protobuf.Timestamp{}
  1775. }
  1776. if err := m.Since.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1777. return err
  1778. }
  1779. iNdEx = postIndex
  1780. default:
  1781. iNdEx = preIndex
  1782. skippy, err := skipLogbroker(dAtA[iNdEx:])
  1783. if err != nil {
  1784. return err
  1785. }
  1786. if skippy < 0 {
  1787. return ErrInvalidLengthLogbroker
  1788. }
  1789. if (iNdEx + skippy) > l {
  1790. return io.ErrUnexpectedEOF
  1791. }
  1792. iNdEx += skippy
  1793. }
  1794. }
  1795. if iNdEx > l {
  1796. return io.ErrUnexpectedEOF
  1797. }
  1798. return nil
  1799. }
  1800. func (m *LogSelector) Unmarshal(dAtA []byte) error {
  1801. l := len(dAtA)
  1802. iNdEx := 0
  1803. for iNdEx < l {
  1804. preIndex := iNdEx
  1805. var wire uint64
  1806. for shift := uint(0); ; shift += 7 {
  1807. if shift >= 64 {
  1808. return ErrIntOverflowLogbroker
  1809. }
  1810. if iNdEx >= l {
  1811. return io.ErrUnexpectedEOF
  1812. }
  1813. b := dAtA[iNdEx]
  1814. iNdEx++
  1815. wire |= (uint64(b) & 0x7F) << shift
  1816. if b < 0x80 {
  1817. break
  1818. }
  1819. }
  1820. fieldNum := int32(wire >> 3)
  1821. wireType := int(wire & 0x7)
  1822. if wireType == 4 {
  1823. return fmt.Errorf("proto: LogSelector: wiretype end group for non-group")
  1824. }
  1825. if fieldNum <= 0 {
  1826. return fmt.Errorf("proto: LogSelector: illegal tag %d (wire type %d)", fieldNum, wire)
  1827. }
  1828. switch fieldNum {
  1829. case 1:
  1830. if wireType != 2 {
  1831. return fmt.Errorf("proto: wrong wireType = %d for field ServiceIDs", wireType)
  1832. }
  1833. var stringLen uint64
  1834. for shift := uint(0); ; shift += 7 {
  1835. if shift >= 64 {
  1836. return ErrIntOverflowLogbroker
  1837. }
  1838. if iNdEx >= l {
  1839. return io.ErrUnexpectedEOF
  1840. }
  1841. b := dAtA[iNdEx]
  1842. iNdEx++
  1843. stringLen |= (uint64(b) & 0x7F) << shift
  1844. if b < 0x80 {
  1845. break
  1846. }
  1847. }
  1848. intStringLen := int(stringLen)
  1849. if intStringLen < 0 {
  1850. return ErrInvalidLengthLogbroker
  1851. }
  1852. postIndex := iNdEx + intStringLen
  1853. if postIndex > l {
  1854. return io.ErrUnexpectedEOF
  1855. }
  1856. m.ServiceIDs = append(m.ServiceIDs, string(dAtA[iNdEx:postIndex]))
  1857. iNdEx = postIndex
  1858. case 2:
  1859. if wireType != 2 {
  1860. return fmt.Errorf("proto: wrong wireType = %d for field NodeIDs", wireType)
  1861. }
  1862. var stringLen uint64
  1863. for shift := uint(0); ; shift += 7 {
  1864. if shift >= 64 {
  1865. return ErrIntOverflowLogbroker
  1866. }
  1867. if iNdEx >= l {
  1868. return io.ErrUnexpectedEOF
  1869. }
  1870. b := dAtA[iNdEx]
  1871. iNdEx++
  1872. stringLen |= (uint64(b) & 0x7F) << shift
  1873. if b < 0x80 {
  1874. break
  1875. }
  1876. }
  1877. intStringLen := int(stringLen)
  1878. if intStringLen < 0 {
  1879. return ErrInvalidLengthLogbroker
  1880. }
  1881. postIndex := iNdEx + intStringLen
  1882. if postIndex > l {
  1883. return io.ErrUnexpectedEOF
  1884. }
  1885. m.NodeIDs = append(m.NodeIDs, string(dAtA[iNdEx:postIndex]))
  1886. iNdEx = postIndex
  1887. case 3:
  1888. if wireType != 2 {
  1889. return fmt.Errorf("proto: wrong wireType = %d for field TaskIDs", wireType)
  1890. }
  1891. var stringLen uint64
  1892. for shift := uint(0); ; shift += 7 {
  1893. if shift >= 64 {
  1894. return ErrIntOverflowLogbroker
  1895. }
  1896. if iNdEx >= l {
  1897. return io.ErrUnexpectedEOF
  1898. }
  1899. b := dAtA[iNdEx]
  1900. iNdEx++
  1901. stringLen |= (uint64(b) & 0x7F) << shift
  1902. if b < 0x80 {
  1903. break
  1904. }
  1905. }
  1906. intStringLen := int(stringLen)
  1907. if intStringLen < 0 {
  1908. return ErrInvalidLengthLogbroker
  1909. }
  1910. postIndex := iNdEx + intStringLen
  1911. if postIndex > l {
  1912. return io.ErrUnexpectedEOF
  1913. }
  1914. m.TaskIDs = append(m.TaskIDs, string(dAtA[iNdEx:postIndex]))
  1915. iNdEx = postIndex
  1916. default:
  1917. iNdEx = preIndex
  1918. skippy, err := skipLogbroker(dAtA[iNdEx:])
  1919. if err != nil {
  1920. return err
  1921. }
  1922. if skippy < 0 {
  1923. return ErrInvalidLengthLogbroker
  1924. }
  1925. if (iNdEx + skippy) > l {
  1926. return io.ErrUnexpectedEOF
  1927. }
  1928. iNdEx += skippy
  1929. }
  1930. }
  1931. if iNdEx > l {
  1932. return io.ErrUnexpectedEOF
  1933. }
  1934. return nil
  1935. }
  1936. func (m *LogContext) Unmarshal(dAtA []byte) error {
  1937. l := len(dAtA)
  1938. iNdEx := 0
  1939. for iNdEx < l {
  1940. preIndex := iNdEx
  1941. var wire uint64
  1942. for shift := uint(0); ; shift += 7 {
  1943. if shift >= 64 {
  1944. return ErrIntOverflowLogbroker
  1945. }
  1946. if iNdEx >= l {
  1947. return io.ErrUnexpectedEOF
  1948. }
  1949. b := dAtA[iNdEx]
  1950. iNdEx++
  1951. wire |= (uint64(b) & 0x7F) << shift
  1952. if b < 0x80 {
  1953. break
  1954. }
  1955. }
  1956. fieldNum := int32(wire >> 3)
  1957. wireType := int(wire & 0x7)
  1958. if wireType == 4 {
  1959. return fmt.Errorf("proto: LogContext: wiretype end group for non-group")
  1960. }
  1961. if fieldNum <= 0 {
  1962. return fmt.Errorf("proto: LogContext: illegal tag %d (wire type %d)", fieldNum, wire)
  1963. }
  1964. switch fieldNum {
  1965. case 1:
  1966. if wireType != 2 {
  1967. return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
  1968. }
  1969. var stringLen uint64
  1970. for shift := uint(0); ; shift += 7 {
  1971. if shift >= 64 {
  1972. return ErrIntOverflowLogbroker
  1973. }
  1974. if iNdEx >= l {
  1975. return io.ErrUnexpectedEOF
  1976. }
  1977. b := dAtA[iNdEx]
  1978. iNdEx++
  1979. stringLen |= (uint64(b) & 0x7F) << shift
  1980. if b < 0x80 {
  1981. break
  1982. }
  1983. }
  1984. intStringLen := int(stringLen)
  1985. if intStringLen < 0 {
  1986. return ErrInvalidLengthLogbroker
  1987. }
  1988. postIndex := iNdEx + intStringLen
  1989. if postIndex > l {
  1990. return io.ErrUnexpectedEOF
  1991. }
  1992. m.ServiceID = string(dAtA[iNdEx:postIndex])
  1993. iNdEx = postIndex
  1994. case 2:
  1995. if wireType != 2 {
  1996. return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
  1997. }
  1998. var stringLen uint64
  1999. for shift := uint(0); ; shift += 7 {
  2000. if shift >= 64 {
  2001. return ErrIntOverflowLogbroker
  2002. }
  2003. if iNdEx >= l {
  2004. return io.ErrUnexpectedEOF
  2005. }
  2006. b := dAtA[iNdEx]
  2007. iNdEx++
  2008. stringLen |= (uint64(b) & 0x7F) << shift
  2009. if b < 0x80 {
  2010. break
  2011. }
  2012. }
  2013. intStringLen := int(stringLen)
  2014. if intStringLen < 0 {
  2015. return ErrInvalidLengthLogbroker
  2016. }
  2017. postIndex := iNdEx + intStringLen
  2018. if postIndex > l {
  2019. return io.ErrUnexpectedEOF
  2020. }
  2021. m.NodeID = string(dAtA[iNdEx:postIndex])
  2022. iNdEx = postIndex
  2023. case 3:
  2024. if wireType != 2 {
  2025. return fmt.Errorf("proto: wrong wireType = %d for field TaskID", wireType)
  2026. }
  2027. var stringLen uint64
  2028. for shift := uint(0); ; shift += 7 {
  2029. if shift >= 64 {
  2030. return ErrIntOverflowLogbroker
  2031. }
  2032. if iNdEx >= l {
  2033. return io.ErrUnexpectedEOF
  2034. }
  2035. b := dAtA[iNdEx]
  2036. iNdEx++
  2037. stringLen |= (uint64(b) & 0x7F) << shift
  2038. if b < 0x80 {
  2039. break
  2040. }
  2041. }
  2042. intStringLen := int(stringLen)
  2043. if intStringLen < 0 {
  2044. return ErrInvalidLengthLogbroker
  2045. }
  2046. postIndex := iNdEx + intStringLen
  2047. if postIndex > l {
  2048. return io.ErrUnexpectedEOF
  2049. }
  2050. m.TaskID = string(dAtA[iNdEx:postIndex])
  2051. iNdEx = postIndex
  2052. default:
  2053. iNdEx = preIndex
  2054. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2055. if err != nil {
  2056. return err
  2057. }
  2058. if skippy < 0 {
  2059. return ErrInvalidLengthLogbroker
  2060. }
  2061. if (iNdEx + skippy) > l {
  2062. return io.ErrUnexpectedEOF
  2063. }
  2064. iNdEx += skippy
  2065. }
  2066. }
  2067. if iNdEx > l {
  2068. return io.ErrUnexpectedEOF
  2069. }
  2070. return nil
  2071. }
  2072. func (m *LogMessage) Unmarshal(dAtA []byte) error {
  2073. l := len(dAtA)
  2074. iNdEx := 0
  2075. for iNdEx < l {
  2076. preIndex := iNdEx
  2077. var wire uint64
  2078. for shift := uint(0); ; shift += 7 {
  2079. if shift >= 64 {
  2080. return ErrIntOverflowLogbroker
  2081. }
  2082. if iNdEx >= l {
  2083. return io.ErrUnexpectedEOF
  2084. }
  2085. b := dAtA[iNdEx]
  2086. iNdEx++
  2087. wire |= (uint64(b) & 0x7F) << shift
  2088. if b < 0x80 {
  2089. break
  2090. }
  2091. }
  2092. fieldNum := int32(wire >> 3)
  2093. wireType := int(wire & 0x7)
  2094. if wireType == 4 {
  2095. return fmt.Errorf("proto: LogMessage: wiretype end group for non-group")
  2096. }
  2097. if fieldNum <= 0 {
  2098. return fmt.Errorf("proto: LogMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  2099. }
  2100. switch fieldNum {
  2101. case 1:
  2102. if wireType != 2 {
  2103. return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
  2104. }
  2105. var msglen int
  2106. for shift := uint(0); ; shift += 7 {
  2107. if shift >= 64 {
  2108. return ErrIntOverflowLogbroker
  2109. }
  2110. if iNdEx >= l {
  2111. return io.ErrUnexpectedEOF
  2112. }
  2113. b := dAtA[iNdEx]
  2114. iNdEx++
  2115. msglen |= (int(b) & 0x7F) << shift
  2116. if b < 0x80 {
  2117. break
  2118. }
  2119. }
  2120. if msglen < 0 {
  2121. return ErrInvalidLengthLogbroker
  2122. }
  2123. postIndex := iNdEx + msglen
  2124. if postIndex > l {
  2125. return io.ErrUnexpectedEOF
  2126. }
  2127. if err := m.Context.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2128. return err
  2129. }
  2130. iNdEx = postIndex
  2131. case 2:
  2132. if wireType != 2 {
  2133. return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  2134. }
  2135. var msglen int
  2136. for shift := uint(0); ; shift += 7 {
  2137. if shift >= 64 {
  2138. return ErrIntOverflowLogbroker
  2139. }
  2140. if iNdEx >= l {
  2141. return io.ErrUnexpectedEOF
  2142. }
  2143. b := dAtA[iNdEx]
  2144. iNdEx++
  2145. msglen |= (int(b) & 0x7F) << shift
  2146. if b < 0x80 {
  2147. break
  2148. }
  2149. }
  2150. if msglen < 0 {
  2151. return ErrInvalidLengthLogbroker
  2152. }
  2153. postIndex := iNdEx + msglen
  2154. if postIndex > l {
  2155. return io.ErrUnexpectedEOF
  2156. }
  2157. if m.Timestamp == nil {
  2158. m.Timestamp = &google_protobuf.Timestamp{}
  2159. }
  2160. if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2161. return err
  2162. }
  2163. iNdEx = postIndex
  2164. case 3:
  2165. if wireType != 0 {
  2166. return fmt.Errorf("proto: wrong wireType = %d for field Stream", wireType)
  2167. }
  2168. m.Stream = 0
  2169. for shift := uint(0); ; shift += 7 {
  2170. if shift >= 64 {
  2171. return ErrIntOverflowLogbroker
  2172. }
  2173. if iNdEx >= l {
  2174. return io.ErrUnexpectedEOF
  2175. }
  2176. b := dAtA[iNdEx]
  2177. iNdEx++
  2178. m.Stream |= (LogStream(b) & 0x7F) << shift
  2179. if b < 0x80 {
  2180. break
  2181. }
  2182. }
  2183. case 4:
  2184. if wireType != 2 {
  2185. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  2186. }
  2187. var byteLen int
  2188. for shift := uint(0); ; shift += 7 {
  2189. if shift >= 64 {
  2190. return ErrIntOverflowLogbroker
  2191. }
  2192. if iNdEx >= l {
  2193. return io.ErrUnexpectedEOF
  2194. }
  2195. b := dAtA[iNdEx]
  2196. iNdEx++
  2197. byteLen |= (int(b) & 0x7F) << shift
  2198. if b < 0x80 {
  2199. break
  2200. }
  2201. }
  2202. if byteLen < 0 {
  2203. return ErrInvalidLengthLogbroker
  2204. }
  2205. postIndex := iNdEx + byteLen
  2206. if postIndex > l {
  2207. return io.ErrUnexpectedEOF
  2208. }
  2209. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  2210. if m.Data == nil {
  2211. m.Data = []byte{}
  2212. }
  2213. iNdEx = postIndex
  2214. default:
  2215. iNdEx = preIndex
  2216. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2217. if err != nil {
  2218. return err
  2219. }
  2220. if skippy < 0 {
  2221. return ErrInvalidLengthLogbroker
  2222. }
  2223. if (iNdEx + skippy) > l {
  2224. return io.ErrUnexpectedEOF
  2225. }
  2226. iNdEx += skippy
  2227. }
  2228. }
  2229. if iNdEx > l {
  2230. return io.ErrUnexpectedEOF
  2231. }
  2232. return nil
  2233. }
  2234. func (m *SubscribeLogsRequest) Unmarshal(dAtA []byte) error {
  2235. l := len(dAtA)
  2236. iNdEx := 0
  2237. for iNdEx < l {
  2238. preIndex := iNdEx
  2239. var wire uint64
  2240. for shift := uint(0); ; shift += 7 {
  2241. if shift >= 64 {
  2242. return ErrIntOverflowLogbroker
  2243. }
  2244. if iNdEx >= l {
  2245. return io.ErrUnexpectedEOF
  2246. }
  2247. b := dAtA[iNdEx]
  2248. iNdEx++
  2249. wire |= (uint64(b) & 0x7F) << shift
  2250. if b < 0x80 {
  2251. break
  2252. }
  2253. }
  2254. fieldNum := int32(wire >> 3)
  2255. wireType := int(wire & 0x7)
  2256. if wireType == 4 {
  2257. return fmt.Errorf("proto: SubscribeLogsRequest: wiretype end group for non-group")
  2258. }
  2259. if fieldNum <= 0 {
  2260. return fmt.Errorf("proto: SubscribeLogsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2261. }
  2262. switch fieldNum {
  2263. case 1:
  2264. if wireType != 2 {
  2265. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  2266. }
  2267. var msglen int
  2268. for shift := uint(0); ; shift += 7 {
  2269. if shift >= 64 {
  2270. return ErrIntOverflowLogbroker
  2271. }
  2272. if iNdEx >= l {
  2273. return io.ErrUnexpectedEOF
  2274. }
  2275. b := dAtA[iNdEx]
  2276. iNdEx++
  2277. msglen |= (int(b) & 0x7F) << shift
  2278. if b < 0x80 {
  2279. break
  2280. }
  2281. }
  2282. if msglen < 0 {
  2283. return ErrInvalidLengthLogbroker
  2284. }
  2285. postIndex := iNdEx + msglen
  2286. if postIndex > l {
  2287. return io.ErrUnexpectedEOF
  2288. }
  2289. if m.Selector == nil {
  2290. m.Selector = &LogSelector{}
  2291. }
  2292. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2293. return err
  2294. }
  2295. iNdEx = postIndex
  2296. case 2:
  2297. if wireType != 2 {
  2298. return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  2299. }
  2300. var msglen int
  2301. for shift := uint(0); ; shift += 7 {
  2302. if shift >= 64 {
  2303. return ErrIntOverflowLogbroker
  2304. }
  2305. if iNdEx >= l {
  2306. return io.ErrUnexpectedEOF
  2307. }
  2308. b := dAtA[iNdEx]
  2309. iNdEx++
  2310. msglen |= (int(b) & 0x7F) << shift
  2311. if b < 0x80 {
  2312. break
  2313. }
  2314. }
  2315. if msglen < 0 {
  2316. return ErrInvalidLengthLogbroker
  2317. }
  2318. postIndex := iNdEx + msglen
  2319. if postIndex > l {
  2320. return io.ErrUnexpectedEOF
  2321. }
  2322. if m.Options == nil {
  2323. m.Options = &LogSubscriptionOptions{}
  2324. }
  2325. if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2326. return err
  2327. }
  2328. iNdEx = postIndex
  2329. default:
  2330. iNdEx = preIndex
  2331. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2332. if err != nil {
  2333. return err
  2334. }
  2335. if skippy < 0 {
  2336. return ErrInvalidLengthLogbroker
  2337. }
  2338. if (iNdEx + skippy) > l {
  2339. return io.ErrUnexpectedEOF
  2340. }
  2341. iNdEx += skippy
  2342. }
  2343. }
  2344. if iNdEx > l {
  2345. return io.ErrUnexpectedEOF
  2346. }
  2347. return nil
  2348. }
  2349. func (m *SubscribeLogsMessage) Unmarshal(dAtA []byte) error {
  2350. l := len(dAtA)
  2351. iNdEx := 0
  2352. for iNdEx < l {
  2353. preIndex := iNdEx
  2354. var wire uint64
  2355. for shift := uint(0); ; shift += 7 {
  2356. if shift >= 64 {
  2357. return ErrIntOverflowLogbroker
  2358. }
  2359. if iNdEx >= l {
  2360. return io.ErrUnexpectedEOF
  2361. }
  2362. b := dAtA[iNdEx]
  2363. iNdEx++
  2364. wire |= (uint64(b) & 0x7F) << shift
  2365. if b < 0x80 {
  2366. break
  2367. }
  2368. }
  2369. fieldNum := int32(wire >> 3)
  2370. wireType := int(wire & 0x7)
  2371. if wireType == 4 {
  2372. return fmt.Errorf("proto: SubscribeLogsMessage: wiretype end group for non-group")
  2373. }
  2374. if fieldNum <= 0 {
  2375. return fmt.Errorf("proto: SubscribeLogsMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  2376. }
  2377. switch fieldNum {
  2378. case 1:
  2379. if wireType != 2 {
  2380. return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
  2381. }
  2382. var msglen int
  2383. for shift := uint(0); ; shift += 7 {
  2384. if shift >= 64 {
  2385. return ErrIntOverflowLogbroker
  2386. }
  2387. if iNdEx >= l {
  2388. return io.ErrUnexpectedEOF
  2389. }
  2390. b := dAtA[iNdEx]
  2391. iNdEx++
  2392. msglen |= (int(b) & 0x7F) << shift
  2393. if b < 0x80 {
  2394. break
  2395. }
  2396. }
  2397. if msglen < 0 {
  2398. return ErrInvalidLengthLogbroker
  2399. }
  2400. postIndex := iNdEx + msglen
  2401. if postIndex > l {
  2402. return io.ErrUnexpectedEOF
  2403. }
  2404. m.Messages = append(m.Messages, LogMessage{})
  2405. if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2406. return err
  2407. }
  2408. iNdEx = postIndex
  2409. default:
  2410. iNdEx = preIndex
  2411. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2412. if err != nil {
  2413. return err
  2414. }
  2415. if skippy < 0 {
  2416. return ErrInvalidLengthLogbroker
  2417. }
  2418. if (iNdEx + skippy) > l {
  2419. return io.ErrUnexpectedEOF
  2420. }
  2421. iNdEx += skippy
  2422. }
  2423. }
  2424. if iNdEx > l {
  2425. return io.ErrUnexpectedEOF
  2426. }
  2427. return nil
  2428. }
  2429. func (m *ListenSubscriptionsRequest) Unmarshal(dAtA []byte) error {
  2430. l := len(dAtA)
  2431. iNdEx := 0
  2432. for iNdEx < l {
  2433. preIndex := iNdEx
  2434. var wire uint64
  2435. for shift := uint(0); ; shift += 7 {
  2436. if shift >= 64 {
  2437. return ErrIntOverflowLogbroker
  2438. }
  2439. if iNdEx >= l {
  2440. return io.ErrUnexpectedEOF
  2441. }
  2442. b := dAtA[iNdEx]
  2443. iNdEx++
  2444. wire |= (uint64(b) & 0x7F) << shift
  2445. if b < 0x80 {
  2446. break
  2447. }
  2448. }
  2449. fieldNum := int32(wire >> 3)
  2450. wireType := int(wire & 0x7)
  2451. if wireType == 4 {
  2452. return fmt.Errorf("proto: ListenSubscriptionsRequest: wiretype end group for non-group")
  2453. }
  2454. if fieldNum <= 0 {
  2455. return fmt.Errorf("proto: ListenSubscriptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2456. }
  2457. switch fieldNum {
  2458. default:
  2459. iNdEx = preIndex
  2460. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2461. if err != nil {
  2462. return err
  2463. }
  2464. if skippy < 0 {
  2465. return ErrInvalidLengthLogbroker
  2466. }
  2467. if (iNdEx + skippy) > l {
  2468. return io.ErrUnexpectedEOF
  2469. }
  2470. iNdEx += skippy
  2471. }
  2472. }
  2473. if iNdEx > l {
  2474. return io.ErrUnexpectedEOF
  2475. }
  2476. return nil
  2477. }
  2478. func (m *SubscriptionMessage) Unmarshal(dAtA []byte) error {
  2479. l := len(dAtA)
  2480. iNdEx := 0
  2481. for iNdEx < l {
  2482. preIndex := iNdEx
  2483. var wire uint64
  2484. for shift := uint(0); ; shift += 7 {
  2485. if shift >= 64 {
  2486. return ErrIntOverflowLogbroker
  2487. }
  2488. if iNdEx >= l {
  2489. return io.ErrUnexpectedEOF
  2490. }
  2491. b := dAtA[iNdEx]
  2492. iNdEx++
  2493. wire |= (uint64(b) & 0x7F) << shift
  2494. if b < 0x80 {
  2495. break
  2496. }
  2497. }
  2498. fieldNum := int32(wire >> 3)
  2499. wireType := int(wire & 0x7)
  2500. if wireType == 4 {
  2501. return fmt.Errorf("proto: SubscriptionMessage: wiretype end group for non-group")
  2502. }
  2503. if fieldNum <= 0 {
  2504. return fmt.Errorf("proto: SubscriptionMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  2505. }
  2506. switch fieldNum {
  2507. case 1:
  2508. if wireType != 2 {
  2509. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2510. }
  2511. var stringLen uint64
  2512. for shift := uint(0); ; shift += 7 {
  2513. if shift >= 64 {
  2514. return ErrIntOverflowLogbroker
  2515. }
  2516. if iNdEx >= l {
  2517. return io.ErrUnexpectedEOF
  2518. }
  2519. b := dAtA[iNdEx]
  2520. iNdEx++
  2521. stringLen |= (uint64(b) & 0x7F) << shift
  2522. if b < 0x80 {
  2523. break
  2524. }
  2525. }
  2526. intStringLen := int(stringLen)
  2527. if intStringLen < 0 {
  2528. return ErrInvalidLengthLogbroker
  2529. }
  2530. postIndex := iNdEx + intStringLen
  2531. if postIndex > l {
  2532. return io.ErrUnexpectedEOF
  2533. }
  2534. m.ID = string(dAtA[iNdEx:postIndex])
  2535. iNdEx = postIndex
  2536. case 2:
  2537. if wireType != 2 {
  2538. return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
  2539. }
  2540. var msglen int
  2541. for shift := uint(0); ; shift += 7 {
  2542. if shift >= 64 {
  2543. return ErrIntOverflowLogbroker
  2544. }
  2545. if iNdEx >= l {
  2546. return io.ErrUnexpectedEOF
  2547. }
  2548. b := dAtA[iNdEx]
  2549. iNdEx++
  2550. msglen |= (int(b) & 0x7F) << shift
  2551. if b < 0x80 {
  2552. break
  2553. }
  2554. }
  2555. if msglen < 0 {
  2556. return ErrInvalidLengthLogbroker
  2557. }
  2558. postIndex := iNdEx + msglen
  2559. if postIndex > l {
  2560. return io.ErrUnexpectedEOF
  2561. }
  2562. if m.Selector == nil {
  2563. m.Selector = &LogSelector{}
  2564. }
  2565. if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2566. return err
  2567. }
  2568. iNdEx = postIndex
  2569. case 3:
  2570. if wireType != 2 {
  2571. return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  2572. }
  2573. var msglen int
  2574. for shift := uint(0); ; shift += 7 {
  2575. if shift >= 64 {
  2576. return ErrIntOverflowLogbroker
  2577. }
  2578. if iNdEx >= l {
  2579. return io.ErrUnexpectedEOF
  2580. }
  2581. b := dAtA[iNdEx]
  2582. iNdEx++
  2583. msglen |= (int(b) & 0x7F) << shift
  2584. if b < 0x80 {
  2585. break
  2586. }
  2587. }
  2588. if msglen < 0 {
  2589. return ErrInvalidLengthLogbroker
  2590. }
  2591. postIndex := iNdEx + msglen
  2592. if postIndex > l {
  2593. return io.ErrUnexpectedEOF
  2594. }
  2595. if m.Options == nil {
  2596. m.Options = &LogSubscriptionOptions{}
  2597. }
  2598. if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2599. return err
  2600. }
  2601. iNdEx = postIndex
  2602. case 4:
  2603. if wireType != 0 {
  2604. return fmt.Errorf("proto: wrong wireType = %d for field Close", wireType)
  2605. }
  2606. var v int
  2607. for shift := uint(0); ; shift += 7 {
  2608. if shift >= 64 {
  2609. return ErrIntOverflowLogbroker
  2610. }
  2611. if iNdEx >= l {
  2612. return io.ErrUnexpectedEOF
  2613. }
  2614. b := dAtA[iNdEx]
  2615. iNdEx++
  2616. v |= (int(b) & 0x7F) << shift
  2617. if b < 0x80 {
  2618. break
  2619. }
  2620. }
  2621. m.Close = bool(v != 0)
  2622. default:
  2623. iNdEx = preIndex
  2624. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2625. if err != nil {
  2626. return err
  2627. }
  2628. if skippy < 0 {
  2629. return ErrInvalidLengthLogbroker
  2630. }
  2631. if (iNdEx + skippy) > l {
  2632. return io.ErrUnexpectedEOF
  2633. }
  2634. iNdEx += skippy
  2635. }
  2636. }
  2637. if iNdEx > l {
  2638. return io.ErrUnexpectedEOF
  2639. }
  2640. return nil
  2641. }
  2642. func (m *PublishLogsMessage) Unmarshal(dAtA []byte) error {
  2643. l := len(dAtA)
  2644. iNdEx := 0
  2645. for iNdEx < l {
  2646. preIndex := iNdEx
  2647. var wire uint64
  2648. for shift := uint(0); ; shift += 7 {
  2649. if shift >= 64 {
  2650. return ErrIntOverflowLogbroker
  2651. }
  2652. if iNdEx >= l {
  2653. return io.ErrUnexpectedEOF
  2654. }
  2655. b := dAtA[iNdEx]
  2656. iNdEx++
  2657. wire |= (uint64(b) & 0x7F) << shift
  2658. if b < 0x80 {
  2659. break
  2660. }
  2661. }
  2662. fieldNum := int32(wire >> 3)
  2663. wireType := int(wire & 0x7)
  2664. if wireType == 4 {
  2665. return fmt.Errorf("proto: PublishLogsMessage: wiretype end group for non-group")
  2666. }
  2667. if fieldNum <= 0 {
  2668. return fmt.Errorf("proto: PublishLogsMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  2669. }
  2670. switch fieldNum {
  2671. case 1:
  2672. if wireType != 2 {
  2673. return fmt.Errorf("proto: wrong wireType = %d for field SubscriptionID", wireType)
  2674. }
  2675. var stringLen uint64
  2676. for shift := uint(0); ; shift += 7 {
  2677. if shift >= 64 {
  2678. return ErrIntOverflowLogbroker
  2679. }
  2680. if iNdEx >= l {
  2681. return io.ErrUnexpectedEOF
  2682. }
  2683. b := dAtA[iNdEx]
  2684. iNdEx++
  2685. stringLen |= (uint64(b) & 0x7F) << shift
  2686. if b < 0x80 {
  2687. break
  2688. }
  2689. }
  2690. intStringLen := int(stringLen)
  2691. if intStringLen < 0 {
  2692. return ErrInvalidLengthLogbroker
  2693. }
  2694. postIndex := iNdEx + intStringLen
  2695. if postIndex > l {
  2696. return io.ErrUnexpectedEOF
  2697. }
  2698. m.SubscriptionID = string(dAtA[iNdEx:postIndex])
  2699. iNdEx = postIndex
  2700. case 2:
  2701. if wireType != 2 {
  2702. return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
  2703. }
  2704. var msglen int
  2705. for shift := uint(0); ; shift += 7 {
  2706. if shift >= 64 {
  2707. return ErrIntOverflowLogbroker
  2708. }
  2709. if iNdEx >= l {
  2710. return io.ErrUnexpectedEOF
  2711. }
  2712. b := dAtA[iNdEx]
  2713. iNdEx++
  2714. msglen |= (int(b) & 0x7F) << shift
  2715. if b < 0x80 {
  2716. break
  2717. }
  2718. }
  2719. if msglen < 0 {
  2720. return ErrInvalidLengthLogbroker
  2721. }
  2722. postIndex := iNdEx + msglen
  2723. if postIndex > l {
  2724. return io.ErrUnexpectedEOF
  2725. }
  2726. m.Messages = append(m.Messages, LogMessage{})
  2727. if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2728. return err
  2729. }
  2730. iNdEx = postIndex
  2731. case 3:
  2732. if wireType != 0 {
  2733. return fmt.Errorf("proto: wrong wireType = %d for field Close", wireType)
  2734. }
  2735. var v int
  2736. for shift := uint(0); ; shift += 7 {
  2737. if shift >= 64 {
  2738. return ErrIntOverflowLogbroker
  2739. }
  2740. if iNdEx >= l {
  2741. return io.ErrUnexpectedEOF
  2742. }
  2743. b := dAtA[iNdEx]
  2744. iNdEx++
  2745. v |= (int(b) & 0x7F) << shift
  2746. if b < 0x80 {
  2747. break
  2748. }
  2749. }
  2750. m.Close = bool(v != 0)
  2751. default:
  2752. iNdEx = preIndex
  2753. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2754. if err != nil {
  2755. return err
  2756. }
  2757. if skippy < 0 {
  2758. return ErrInvalidLengthLogbroker
  2759. }
  2760. if (iNdEx + skippy) > l {
  2761. return io.ErrUnexpectedEOF
  2762. }
  2763. iNdEx += skippy
  2764. }
  2765. }
  2766. if iNdEx > l {
  2767. return io.ErrUnexpectedEOF
  2768. }
  2769. return nil
  2770. }
  2771. func (m *PublishLogsResponse) Unmarshal(dAtA []byte) error {
  2772. l := len(dAtA)
  2773. iNdEx := 0
  2774. for iNdEx < l {
  2775. preIndex := iNdEx
  2776. var wire uint64
  2777. for shift := uint(0); ; shift += 7 {
  2778. if shift >= 64 {
  2779. return ErrIntOverflowLogbroker
  2780. }
  2781. if iNdEx >= l {
  2782. return io.ErrUnexpectedEOF
  2783. }
  2784. b := dAtA[iNdEx]
  2785. iNdEx++
  2786. wire |= (uint64(b) & 0x7F) << shift
  2787. if b < 0x80 {
  2788. break
  2789. }
  2790. }
  2791. fieldNum := int32(wire >> 3)
  2792. wireType := int(wire & 0x7)
  2793. if wireType == 4 {
  2794. return fmt.Errorf("proto: PublishLogsResponse: wiretype end group for non-group")
  2795. }
  2796. if fieldNum <= 0 {
  2797. return fmt.Errorf("proto: PublishLogsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2798. }
  2799. switch fieldNum {
  2800. default:
  2801. iNdEx = preIndex
  2802. skippy, err := skipLogbroker(dAtA[iNdEx:])
  2803. if err != nil {
  2804. return err
  2805. }
  2806. if skippy < 0 {
  2807. return ErrInvalidLengthLogbroker
  2808. }
  2809. if (iNdEx + skippy) > l {
  2810. return io.ErrUnexpectedEOF
  2811. }
  2812. iNdEx += skippy
  2813. }
  2814. }
  2815. if iNdEx > l {
  2816. return io.ErrUnexpectedEOF
  2817. }
  2818. return nil
  2819. }
  2820. func skipLogbroker(dAtA []byte) (n int, err error) {
  2821. l := len(dAtA)
  2822. iNdEx := 0
  2823. for iNdEx < l {
  2824. var wire uint64
  2825. for shift := uint(0); ; shift += 7 {
  2826. if shift >= 64 {
  2827. return 0, ErrIntOverflowLogbroker
  2828. }
  2829. if iNdEx >= l {
  2830. return 0, io.ErrUnexpectedEOF
  2831. }
  2832. b := dAtA[iNdEx]
  2833. iNdEx++
  2834. wire |= (uint64(b) & 0x7F) << shift
  2835. if b < 0x80 {
  2836. break
  2837. }
  2838. }
  2839. wireType := int(wire & 0x7)
  2840. switch wireType {
  2841. case 0:
  2842. for shift := uint(0); ; shift += 7 {
  2843. if shift >= 64 {
  2844. return 0, ErrIntOverflowLogbroker
  2845. }
  2846. if iNdEx >= l {
  2847. return 0, io.ErrUnexpectedEOF
  2848. }
  2849. iNdEx++
  2850. if dAtA[iNdEx-1] < 0x80 {
  2851. break
  2852. }
  2853. }
  2854. return iNdEx, nil
  2855. case 1:
  2856. iNdEx += 8
  2857. return iNdEx, nil
  2858. case 2:
  2859. var length int
  2860. for shift := uint(0); ; shift += 7 {
  2861. if shift >= 64 {
  2862. return 0, ErrIntOverflowLogbroker
  2863. }
  2864. if iNdEx >= l {
  2865. return 0, io.ErrUnexpectedEOF
  2866. }
  2867. b := dAtA[iNdEx]
  2868. iNdEx++
  2869. length |= (int(b) & 0x7F) << shift
  2870. if b < 0x80 {
  2871. break
  2872. }
  2873. }
  2874. iNdEx += length
  2875. if length < 0 {
  2876. return 0, ErrInvalidLengthLogbroker
  2877. }
  2878. return iNdEx, nil
  2879. case 3:
  2880. for {
  2881. var innerWire uint64
  2882. var start int = iNdEx
  2883. for shift := uint(0); ; shift += 7 {
  2884. if shift >= 64 {
  2885. return 0, ErrIntOverflowLogbroker
  2886. }
  2887. if iNdEx >= l {
  2888. return 0, io.ErrUnexpectedEOF
  2889. }
  2890. b := dAtA[iNdEx]
  2891. iNdEx++
  2892. innerWire |= (uint64(b) & 0x7F) << shift
  2893. if b < 0x80 {
  2894. break
  2895. }
  2896. }
  2897. innerWireType := int(innerWire & 0x7)
  2898. if innerWireType == 4 {
  2899. break
  2900. }
  2901. next, err := skipLogbroker(dAtA[start:])
  2902. if err != nil {
  2903. return 0, err
  2904. }
  2905. iNdEx = start + next
  2906. }
  2907. return iNdEx, nil
  2908. case 4:
  2909. return iNdEx, nil
  2910. case 5:
  2911. iNdEx += 4
  2912. return iNdEx, nil
  2913. default:
  2914. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2915. }
  2916. }
  2917. panic("unreachable")
  2918. }
  2919. var (
  2920. ErrInvalidLengthLogbroker = fmt.Errorf("proto: negative length found during unmarshaling")
  2921. ErrIntOverflowLogbroker = fmt.Errorf("proto: integer overflow")
  2922. )
  2923. func init() { proto.RegisterFile("logbroker.proto", fileDescriptorLogbroker) }
  2924. var fileDescriptorLogbroker = []byte{
  2925. // 886 bytes of a gzipped FileDescriptorProto
  2926. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0x4f, 0x8f, 0xdb, 0x44,
  2927. 0x18, 0xc6, 0x33, 0xce, 0x36, 0x7f, 0xde, 0x74, 0xff, 0x74, 0xb2, 0x5d, 0x45, 0x11, 0xb5, 0x23,
  2928. 0x57, 0x2a, 0xd1, 0xaa, 0x24, 0x25, 0x08, 0x81, 0x54, 0x09, 0x41, 0x48, 0x85, 0x22, 0xd2, 0x5d,
  2929. 0x34, 0xc9, 0x0a, 0x6e, 0x2b, 0x27, 0x9e, 0x1a, 0x2b, 0x8e, 0x27, 0x78, 0x9c, 0x2e, 0x07, 0x0e,
  2930. 0x1c, 0x8a, 0x84, 0x7a, 0xe0, 0x86, 0x04, 0x87, 0x9e, 0xe8, 0x05, 0x21, 0xc1, 0x9d, 0x0f, 0x80,
  2931. 0x56, 0x9c, 0xe0, 0xc6, 0x29, 0xa2, 0xfe, 0x00, 0x7c, 0x06, 0xe4, 0x99, 0x89, 0xe3, 0x25, 0x49,
  2932. 0x8b, 0xb6, 0x97, 0x64, 0xc6, 0xf3, 0xbc, 0x9e, 0xdf, 0x3c, 0xf3, 0xbc, 0x09, 0xec, 0x7a, 0xcc,
  2933. 0x19, 0x06, 0x6c, 0x4c, 0x83, 0xc6, 0x34, 0x60, 0x21, 0xc3, 0xd8, 0x66, 0xa3, 0x78, 0xc6, 0xcf,
  2934. 0xac, 0x60, 0x32, 0x76, 0xc3, 0xc6, 0xc3, 0xd7, 0xab, 0xfb, 0x0e, 0x73, 0x98, 0x58, 0x6e, 0xc6,
  2935. 0x23, 0xa9, 0xac, 0x1a, 0x0e, 0x63, 0x8e, 0x47, 0x9b, 0x62, 0x36, 0x9c, 0x3d, 0x68, 0x86, 0xee,
  2936. 0x84, 0xf2, 0xd0, 0x9a, 0x4c, 0x95, 0xa0, 0x3c, 0xf5, 0x66, 0x8e, 0xeb, 0x37, 0xe5, 0x97, 0x7c,
  2937. 0x68, 0xfe, 0x82, 0xe0, 0xa0, 0xc7, 0x9c, 0xfe, 0x6c, 0xc8, 0x47, 0x81, 0x3b, 0x0d, 0x5d, 0xe6,
  2938. 0x1f, 0x8b, 0x4f, 0x8e, 0xdf, 0x82, 0x3c, 0x0f, 0x03, 0x6a, 0x4d, 0x78, 0x05, 0xd5, 0xb2, 0xf5,
  2939. 0x9d, 0xd6, 0x8d, 0xc6, 0x2a, 0x4c, 0x23, 0x2e, 0x16, 0x2a, 0xb2, 0x50, 0xe3, 0x03, 0xc8, 0x3d,
  2940. 0x60, 0x9e, 0xc7, 0xce, 0x2a, 0x5a, 0x0d, 0xd5, 0x0b, 0x44, 0xcd, 0x30, 0x86, 0xad, 0xd0, 0x72,
  2941. 0xbd, 0x4a, 0xb6, 0x86, 0xea, 0x59, 0x22, 0xc6, 0xf8, 0x0e, 0x5c, 0xe1, 0xae, 0x3f, 0xa2, 0x95,
  2942. 0xad, 0x1a, 0xaa, 0x97, 0x5a, 0xd5, 0x86, 0x3c, 0x45, 0x63, 0x71, 0x8a, 0xc6, 0x60, 0x71, 0x0a,
  2943. 0x22, 0x85, 0xe6, 0x37, 0x08, 0x4a, 0xf1, 0xa6, 0xd4, 0xa3, 0xa3, 0x90, 0x05, 0xb8, 0x09, 0x25,
  2944. 0x4e, 0x83, 0x87, 0xee, 0x88, 0x9e, 0xba, 0xb6, 0x44, 0x2d, 0xb6, 0x77, 0xa2, 0xb9, 0x01, 0x7d,
  2945. 0xf9, 0xb8, 0xdb, 0xe1, 0x04, 0x94, 0xa4, 0x6b, 0x73, 0x7c, 0x0b, 0x0a, 0x3e, 0xb3, 0xa5, 0x5a,
  2946. 0x13, 0xea, 0x52, 0x34, 0x37, 0xf2, 0x47, 0xcc, 0x16, 0xd2, 0x7c, 0xbc, 0xa8, 0x74, 0xa1, 0xc5,
  2947. 0xc7, 0x42, 0x97, 0x5d, 0xea, 0x06, 0x16, 0x1f, 0x0b, 0x5d, 0xbc, 0xd8, 0xb5, 0xb9, 0xf9, 0x08,
  2948. 0x01, 0xf4, 0x98, 0xf3, 0x3e, 0xf3, 0x43, 0xfa, 0x79, 0x88, 0x6f, 0x03, 0x2c, 0x79, 0x2a, 0xa8,
  2949. 0x86, 0xea, 0xc5, 0xf6, 0x76, 0x34, 0x37, 0x8a, 0x09, 0x0e, 0x29, 0x26, 0x34, 0xf8, 0x26, 0xe4,
  2950. 0x15, 0x8c, 0x30, 0xab, 0xd8, 0x86, 0x68, 0x6e, 0xe4, 0x24, 0x0b, 0xc9, 0x49, 0x94, 0x58, 0xa4,
  2951. 0x48, 0x84, 0x77, 0x4a, 0x24, 0x41, 0x48, 0x4e, 0x72, 0x98, 0x7f, 0x4a, 0x8c, 0xfb, 0x94, 0x73,
  2952. 0xcb, 0xa1, 0xf8, 0x1d, 0xc8, 0x8f, 0x24, 0x91, 0x60, 0x28, 0xb5, 0xf4, 0x0d, 0xb7, 0xa7, 0xb8,
  2953. 0xdb, 0x5b, 0xe7, 0x73, 0x23, 0x43, 0x16, 0x45, 0xf8, 0x6d, 0x28, 0x26, 0x01, 0x12, 0x68, 0xcf,
  2954. 0xbf, 0x9c, 0xa5, 0x18, 0xbf, 0x09, 0x39, 0x99, 0x04, 0x01, 0xfb, 0xc2, 0xd8, 0x28, 0x71, 0x9c,
  2955. 0x0e, 0xdb, 0x0a, 0x2d, 0x11, 0x84, 0xab, 0x44, 0x8c, 0xcd, 0xef, 0x11, 0xec, 0xab, 0x68, 0x0e,
  2956. 0x69, 0x8f, 0x39, 0x9c, 0xd0, 0xcf, 0x66, 0x94, 0x87, 0xf8, 0x2e, 0x14, 0xb8, 0x0a, 0x80, 0x3a,
  2957. 0x9e, 0xb1, 0x69, 0x17, 0x25, 0x23, 0x49, 0x01, 0xee, 0x40, 0x9e, 0xc9, 0x8c, 0xab, 0x83, 0x1d,
  2958. 0x6e, 0xaa, 0x5d, 0xed, 0x0a, 0xb2, 0x28, 0x35, 0x3f, 0xf9, 0x0f, 0xda, 0xc2, 0xf8, 0x77, 0xa1,
  2959. 0x30, 0x91, 0x43, 0x19, 0xc6, 0xcd, 0xce, 0xab, 0x0a, 0xe5, 0x7c, 0x52, 0x65, 0xbe, 0x02, 0xd5,
  2960. 0x9e, 0xcb, 0x43, 0xea, 0xa7, 0xf7, 0x5f, 0x1c, 0xdd, 0xfc, 0x0d, 0x41, 0x39, 0xbd, 0xb0, 0xd8,
  2961. 0xf7, 0x00, 0xb4, 0x24, 0x6f, 0xb9, 0x68, 0x6e, 0x68, 0xdd, 0x0e, 0xd1, 0x5c, 0xfb, 0x82, 0x55,
  2962. 0xda, 0x4b, 0x58, 0x95, 0xbd, 0xb4, 0x55, 0x78, 0x1f, 0xae, 0x8c, 0x3c, 0xc6, 0x65, 0x93, 0x17,
  2963. 0x88, 0x9c, 0x98, 0x3f, 0x22, 0xc0, 0x1f, 0xcd, 0x86, 0x9e, 0xcb, 0x3f, 0x4d, 0xfb, 0x77, 0x17,
  2964. 0x76, 0x79, 0xea, 0x65, 0xcb, 0x26, 0xc2, 0xd1, 0xdc, 0xd8, 0x49, 0xef, 0xd3, 0xed, 0x90, 0x9d,
  2965. 0xb4, 0xb4, 0x6b, 0x5f, 0x30, 0x5f, 0xbb, 0x8c, 0xf9, 0x4b, 0xd6, 0x6c, 0x9a, 0xf5, 0x3a, 0x94,
  2966. 0x53, 0xa8, 0x84, 0xf2, 0x29, 0xf3, 0x39, 0x3d, 0x7c, 0x8a, 0xa0, 0x98, 0x24, 0x19, 0xdf, 0x06,
  2967. 0xdc, 0x3b, 0xfe, 0xe0, 0xb4, 0x3f, 0x20, 0xf7, 0xde, 0xbb, 0x7f, 0x7a, 0x72, 0xf4, 0xe1, 0xd1,
  2968. 0xf1, 0xc7, 0x47, 0x7b, 0x99, 0xea, 0xfe, 0xe3, 0x27, 0xb5, 0xbd, 0x44, 0x76, 0xe2, 0x8f, 0x7d,
  2969. 0x76, 0xe6, 0xe3, 0x43, 0xb8, 0x96, 0x52, 0xf7, 0x07, 0x9d, 0xe3, 0x93, 0xc1, 0x1e, 0xaa, 0x96,
  2970. 0x1f, 0x3f, 0xa9, 0xed, 0x26, 0xe2, 0x7e, 0x68, 0xb3, 0x59, 0xb8, 0xaa, 0xbd, 0x47, 0xc8, 0x9e,
  2971. 0xb6, 0xaa, 0xa5, 0x41, 0x50, 0xbd, 0xf6, 0xf5, 0x0f, 0x7a, 0xe6, 0xd7, 0xa7, 0xfa, 0x12, 0xac,
  2972. 0xf5, 0x08, 0xc1, 0x56, 0xcc, 0x8d, 0xbf, 0x80, 0xed, 0x0b, 0x99, 0xc5, 0xf5, 0x75, 0xee, 0xac,
  2973. 0xeb, 0xb8, 0xea, 0x8b, 0x95, 0xca, 0x51, 0xf3, 0xfa, 0xef, 0x3f, 0xff, 0xf3, 0x9d, 0xb6, 0x0b,
  2974. 0xdb, 0x42, 0xf9, 0xda, 0xc4, 0xf2, 0x2d, 0x87, 0x06, 0x77, 0x50, 0xeb, 0x27, 0x4d, 0xb8, 0xd5,
  2975. 0x16, 0xff, 0x6f, 0xf8, 0x5b, 0x04, 0xe5, 0x35, 0x31, 0xc7, 0x8d, 0xb5, 0x17, 0xb6, 0xb1, 0x1f,
  2976. 0xaa, 0xaf, 0x3e, 0x07, 0x2c, 0xdd, 0x20, 0xe6, 0x4d, 0xc1, 0x75, 0x03, 0xae, 0x4a, 0xae, 0x33,
  2977. 0x16, 0x8c, 0x69, 0xb0, 0x42, 0x89, 0xbf, 0x42, 0x50, 0x4a, 0xdd, 0x35, 0xbe, 0xb5, 0xee, 0xfd,
  2978. 0xab, 0xb9, 0x5d, 0xcf, 0xb1, 0x26, 0x34, 0xff, 0x8b, 0xa3, 0x8e, 0xda, 0x95, 0xf3, 0x67, 0x7a,
  2979. 0xe6, 0xaf, 0x67, 0x7a, 0xe6, 0xcb, 0x48, 0x47, 0xe7, 0x91, 0x8e, 0xfe, 0x88, 0x74, 0xf4, 0x77,
  2980. 0xa4, 0xa3, 0x61, 0x4e, 0xfc, 0xfe, 0xbe, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x37,
  2981. 0x34, 0x6f, 0x2d, 0x08, 0x00, 0x00,
  2982. }