StreamEvent.pb.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/service/ops/log-agent/output/lancergrpc/lancergateway/StreamEvent.proto
  3. /*
  4. Package StreamEvent is a generated protocol buffer package.
  5. It is generated from these files:
  6. app/service/ops/log-agent/output/lancergrpc/lancergateway/StreamEvent.proto
  7. It has these top-level messages:
  8. SimpleEvent
  9. EventList
  10. Response
  11. */
  12. package lancergateway
  13. import proto "github.com/gogo/protobuf/proto"
  14. import fmt "fmt"
  15. import math "math"
  16. import _ "github.com/gogo/protobuf/gogoproto"
  17. import context "golang.org/x/net/context"
  18. import grpc "google.golang.org/grpc"
  19. import io "io"
  20. // Reference imports to suppress errors if they are not otherwise used.
  21. var _ = proto.Marshal
  22. var _ = fmt.Errorf
  23. var _ = math.Inf
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the proto package it is being compiled against.
  26. // A compilation error at this line likely means your copy of the
  27. // proto package needs to be updated.
  28. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  29. type StatusCode int32
  30. const (
  31. StatusCode_NULL StatusCode = 0
  32. StatusCode_SUCCESS StatusCode = 200
  33. StatusCode_LOAD_FULL StatusCode = 429
  34. )
  35. var StatusCode_name = map[int32]string{
  36. 0: "NULL",
  37. 200: "SUCCESS",
  38. 429: "LOAD_FULL",
  39. }
  40. var StatusCode_value = map[string]int32{
  41. "NULL": 0,
  42. "SUCCESS": 200,
  43. "LOAD_FULL": 429,
  44. }
  45. func (x StatusCode) String() string {
  46. return proto.EnumName(StatusCode_name, int32(x))
  47. }
  48. func (StatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptorStreamEvent, []int{0} }
  49. type SimpleEvent struct {
  50. LogId string `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
  51. OuterId string `protobuf:"bytes,2,opt,name=outerId,proto3" json:"outerId,omitempty"`
  52. Header map[string]string `protobuf:"bytes,3,rep,name=header" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  53. Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
  54. }
  55. func (m *SimpleEvent) Reset() { *m = SimpleEvent{} }
  56. func (m *SimpleEvent) String() string { return proto.CompactTextString(m) }
  57. func (*SimpleEvent) ProtoMessage() {}
  58. func (*SimpleEvent) Descriptor() ([]byte, []int) { return fileDescriptorStreamEvent, []int{0} }
  59. func (m *SimpleEvent) GetLogId() string {
  60. if m != nil {
  61. return m.LogId
  62. }
  63. return ""
  64. }
  65. func (m *SimpleEvent) GetOuterId() string {
  66. if m != nil {
  67. return m.OuterId
  68. }
  69. return ""
  70. }
  71. func (m *SimpleEvent) GetHeader() map[string]string {
  72. if m != nil {
  73. return m.Header
  74. }
  75. return nil
  76. }
  77. func (m *SimpleEvent) GetData() []byte {
  78. if m != nil {
  79. return m.Data
  80. }
  81. return nil
  82. }
  83. type EventList struct {
  84. Events []*SimpleEvent `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
  85. }
  86. func (m *EventList) Reset() { *m = EventList{} }
  87. func (m *EventList) String() string { return proto.CompactTextString(m) }
  88. func (*EventList) ProtoMessage() {}
  89. func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorStreamEvent, []int{1} }
  90. func (m *EventList) GetEvents() []*SimpleEvent {
  91. if m != nil {
  92. return m.Events
  93. }
  94. return nil
  95. }
  96. type Response struct {
  97. Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=StatusCode" json:"code,omitempty"`
  98. Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
  99. }
  100. func (m *Response) Reset() { *m = Response{} }
  101. func (m *Response) String() string { return proto.CompactTextString(m) }
  102. func (*Response) ProtoMessage() {}
  103. func (*Response) Descriptor() ([]byte, []int) { return fileDescriptorStreamEvent, []int{2} }
  104. func (m *Response) GetCode() StatusCode {
  105. if m != nil {
  106. return m.Code
  107. }
  108. return StatusCode_NULL
  109. }
  110. func (m *Response) GetMsg() string {
  111. if m != nil {
  112. return m.Msg
  113. }
  114. return ""
  115. }
  116. func init() {
  117. proto.RegisterType((*SimpleEvent)(nil), "SimpleEvent")
  118. proto.RegisterType((*EventList)(nil), "EventList")
  119. proto.RegisterType((*Response)(nil), "Response")
  120. proto.RegisterEnum("StatusCode", StatusCode_name, StatusCode_value)
  121. }
  122. // Reference imports to suppress errors if they are not otherwise used.
  123. var _ context.Context
  124. var _ grpc.ClientConn
  125. // This is a compile-time assertion to ensure that this generated file
  126. // is compatible with the grpc package it is being compiled against.
  127. const _ = grpc.SupportPackageIsVersion4
  128. // Client API for Gateway2Server service
  129. type Gateway2ServerClient interface {
  130. SendList(ctx context.Context, in *EventList, opts ...grpc.CallOption) (*Response, error)
  131. Send(ctx context.Context, in *SimpleEvent, opts ...grpc.CallOption) (*Response, error)
  132. }
  133. type gateway2ServerClient struct {
  134. cc *grpc.ClientConn
  135. }
  136. func NewGateway2ServerClient(cc *grpc.ClientConn) Gateway2ServerClient {
  137. return &gateway2ServerClient{cc}
  138. }
  139. func (c *gateway2ServerClient) SendList(ctx context.Context, in *EventList, opts ...grpc.CallOption) (*Response, error) {
  140. out := new(Response)
  141. err := grpc.Invoke(ctx, "/Gateway2Server/sendList", in, out, c.cc, opts...)
  142. if err != nil {
  143. return nil, err
  144. }
  145. return out, nil
  146. }
  147. func (c *gateway2ServerClient) Send(ctx context.Context, in *SimpleEvent, opts ...grpc.CallOption) (*Response, error) {
  148. out := new(Response)
  149. err := grpc.Invoke(ctx, "/Gateway2Server/send", in, out, c.cc, opts...)
  150. if err != nil {
  151. return nil, err
  152. }
  153. return out, nil
  154. }
  155. // Server API for Gateway2Server service
  156. type Gateway2ServerServer interface {
  157. SendList(context.Context, *EventList) (*Response, error)
  158. Send(context.Context, *SimpleEvent) (*Response, error)
  159. }
  160. func RegisterGateway2ServerServer(s *grpc.Server, srv Gateway2ServerServer) {
  161. s.RegisterService(&_Gateway2Server_serviceDesc, srv)
  162. }
  163. func _Gateway2Server_SendList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  164. in := new(EventList)
  165. if err := dec(in); err != nil {
  166. return nil, err
  167. }
  168. if interceptor == nil {
  169. return srv.(Gateway2ServerServer).SendList(ctx, in)
  170. }
  171. info := &grpc.UnaryServerInfo{
  172. Server: srv,
  173. FullMethod: "/Gateway2Server/SendList",
  174. }
  175. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  176. return srv.(Gateway2ServerServer).SendList(ctx, req.(*EventList))
  177. }
  178. return interceptor(ctx, in, info, handler)
  179. }
  180. func _Gateway2Server_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  181. in := new(SimpleEvent)
  182. if err := dec(in); err != nil {
  183. return nil, err
  184. }
  185. if interceptor == nil {
  186. return srv.(Gateway2ServerServer).Send(ctx, in)
  187. }
  188. info := &grpc.UnaryServerInfo{
  189. Server: srv,
  190. FullMethod: "/Gateway2Server/Send",
  191. }
  192. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  193. return srv.(Gateway2ServerServer).Send(ctx, req.(*SimpleEvent))
  194. }
  195. return interceptor(ctx, in, info, handler)
  196. }
  197. var _Gateway2Server_serviceDesc = grpc.ServiceDesc{
  198. ServiceName: "Gateway2Server",
  199. HandlerType: (*Gateway2ServerServer)(nil),
  200. Methods: []grpc.MethodDesc{
  201. {
  202. MethodName: "sendList",
  203. Handler: _Gateway2Server_SendList_Handler,
  204. },
  205. {
  206. MethodName: "send",
  207. Handler: _Gateway2Server_Send_Handler,
  208. },
  209. },
  210. Streams: []grpc.StreamDesc{},
  211. Metadata: "app/service/ops/log-agent/output/lancergrpc/lancergateway/StreamEvent.proto",
  212. }
  213. func (m *SimpleEvent) Marshal() (dAtA []byte, err error) {
  214. size := m.Size()
  215. dAtA = make([]byte, size)
  216. n, err := m.MarshalTo(dAtA)
  217. if err != nil {
  218. return nil, err
  219. }
  220. return dAtA[:n], nil
  221. }
  222. func (m *SimpleEvent) MarshalTo(dAtA []byte) (int, error) {
  223. var i int
  224. _ = i
  225. var l int
  226. _ = l
  227. if len(m.LogId) > 0 {
  228. dAtA[i] = 0xa
  229. i++
  230. i = encodeVarintStreamEvent(dAtA, i, uint64(len(m.LogId)))
  231. i += copy(dAtA[i:], m.LogId)
  232. }
  233. if len(m.OuterId) > 0 {
  234. dAtA[i] = 0x12
  235. i++
  236. i = encodeVarintStreamEvent(dAtA, i, uint64(len(m.OuterId)))
  237. i += copy(dAtA[i:], m.OuterId)
  238. }
  239. if len(m.Header) > 0 {
  240. for k, _ := range m.Header {
  241. dAtA[i] = 0x1a
  242. i++
  243. v := m.Header[k]
  244. mapSize := 1 + len(k) + sovStreamEvent(uint64(len(k))) + 1 + len(v) + sovStreamEvent(uint64(len(v)))
  245. i = encodeVarintStreamEvent(dAtA, i, uint64(mapSize))
  246. dAtA[i] = 0xa
  247. i++
  248. i = encodeVarintStreamEvent(dAtA, i, uint64(len(k)))
  249. i += copy(dAtA[i:], k)
  250. dAtA[i] = 0x12
  251. i++
  252. i = encodeVarintStreamEvent(dAtA, i, uint64(len(v)))
  253. i += copy(dAtA[i:], v)
  254. }
  255. }
  256. if len(m.Data) > 0 {
  257. dAtA[i] = 0x22
  258. i++
  259. i = encodeVarintStreamEvent(dAtA, i, uint64(len(m.Data)))
  260. i += copy(dAtA[i:], m.Data)
  261. }
  262. return i, nil
  263. }
  264. func (m *EventList) Marshal() (dAtA []byte, err error) {
  265. size := m.Size()
  266. dAtA = make([]byte, size)
  267. n, err := m.MarshalTo(dAtA)
  268. if err != nil {
  269. return nil, err
  270. }
  271. return dAtA[:n], nil
  272. }
  273. func (m *EventList) MarshalTo(dAtA []byte) (int, error) {
  274. var i int
  275. _ = i
  276. var l int
  277. _ = l
  278. if len(m.Events) > 0 {
  279. for _, msg := range m.Events {
  280. dAtA[i] = 0xa
  281. i++
  282. i = encodeVarintStreamEvent(dAtA, i, uint64(msg.Size()))
  283. n, err := msg.MarshalTo(dAtA[i:])
  284. if err != nil {
  285. return 0, err
  286. }
  287. i += n
  288. }
  289. }
  290. return i, nil
  291. }
  292. func (m *Response) Marshal() (dAtA []byte, err error) {
  293. size := m.Size()
  294. dAtA = make([]byte, size)
  295. n, err := m.MarshalTo(dAtA)
  296. if err != nil {
  297. return nil, err
  298. }
  299. return dAtA[:n], nil
  300. }
  301. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  302. var i int
  303. _ = i
  304. var l int
  305. _ = l
  306. if m.Code != 0 {
  307. dAtA[i] = 0x8
  308. i++
  309. i = encodeVarintStreamEvent(dAtA, i, uint64(m.Code))
  310. }
  311. if len(m.Msg) > 0 {
  312. dAtA[i] = 0x12
  313. i++
  314. i = encodeVarintStreamEvent(dAtA, i, uint64(len(m.Msg)))
  315. i += copy(dAtA[i:], m.Msg)
  316. }
  317. return i, nil
  318. }
  319. func encodeVarintStreamEvent(dAtA []byte, offset int, v uint64) int {
  320. for v >= 1<<7 {
  321. dAtA[offset] = uint8(v&0x7f | 0x80)
  322. v >>= 7
  323. offset++
  324. }
  325. dAtA[offset] = uint8(v)
  326. return offset + 1
  327. }
  328. func (m *SimpleEvent) Size() (n int) {
  329. var l int
  330. _ = l
  331. l = len(m.LogId)
  332. if l > 0 {
  333. n += 1 + l + sovStreamEvent(uint64(l))
  334. }
  335. l = len(m.OuterId)
  336. if l > 0 {
  337. n += 1 + l + sovStreamEvent(uint64(l))
  338. }
  339. if len(m.Header) > 0 {
  340. for k, v := range m.Header {
  341. _ = k
  342. _ = v
  343. mapEntrySize := 1 + len(k) + sovStreamEvent(uint64(len(k))) + 1 + len(v) + sovStreamEvent(uint64(len(v)))
  344. n += mapEntrySize + 1 + sovStreamEvent(uint64(mapEntrySize))
  345. }
  346. }
  347. l = len(m.Data)
  348. if l > 0 {
  349. n += 1 + l + sovStreamEvent(uint64(l))
  350. }
  351. return n
  352. }
  353. func (m *EventList) Size() (n int) {
  354. var l int
  355. _ = l
  356. if len(m.Events) > 0 {
  357. for _, e := range m.Events {
  358. l = e.Size()
  359. n += 1 + l + sovStreamEvent(uint64(l))
  360. }
  361. }
  362. return n
  363. }
  364. func (m *Response) Size() (n int) {
  365. var l int
  366. _ = l
  367. if m.Code != 0 {
  368. n += 1 + sovStreamEvent(uint64(m.Code))
  369. }
  370. l = len(m.Msg)
  371. if l > 0 {
  372. n += 1 + l + sovStreamEvent(uint64(l))
  373. }
  374. return n
  375. }
  376. func sovStreamEvent(x uint64) (n int) {
  377. for {
  378. n++
  379. x >>= 7
  380. if x == 0 {
  381. break
  382. }
  383. }
  384. return n
  385. }
  386. func sozStreamEvent(x uint64) (n int) {
  387. return sovStreamEvent(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  388. }
  389. func (m *SimpleEvent) Unmarshal(dAtA []byte) error {
  390. l := len(dAtA)
  391. iNdEx := 0
  392. for iNdEx < l {
  393. preIndex := iNdEx
  394. var wire uint64
  395. for shift := uint(0); ; shift += 7 {
  396. if shift >= 64 {
  397. return ErrIntOverflowStreamEvent
  398. }
  399. if iNdEx >= l {
  400. return io.ErrUnexpectedEOF
  401. }
  402. b := dAtA[iNdEx]
  403. iNdEx++
  404. wire |= (uint64(b) & 0x7F) << shift
  405. if b < 0x80 {
  406. break
  407. }
  408. }
  409. fieldNum := int32(wire >> 3)
  410. wireType := int(wire & 0x7)
  411. if wireType == 4 {
  412. return fmt.Errorf("proto: SimpleEvent: wiretype end group for non-group")
  413. }
  414. if fieldNum <= 0 {
  415. return fmt.Errorf("proto: SimpleEvent: illegal tag %d (wire type %d)", fieldNum, wire)
  416. }
  417. switch fieldNum {
  418. case 1:
  419. if wireType != 2 {
  420. return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType)
  421. }
  422. var stringLen uint64
  423. for shift := uint(0); ; shift += 7 {
  424. if shift >= 64 {
  425. return ErrIntOverflowStreamEvent
  426. }
  427. if iNdEx >= l {
  428. return io.ErrUnexpectedEOF
  429. }
  430. b := dAtA[iNdEx]
  431. iNdEx++
  432. stringLen |= (uint64(b) & 0x7F) << shift
  433. if b < 0x80 {
  434. break
  435. }
  436. }
  437. intStringLen := int(stringLen)
  438. if intStringLen < 0 {
  439. return ErrInvalidLengthStreamEvent
  440. }
  441. postIndex := iNdEx + intStringLen
  442. if postIndex > l {
  443. return io.ErrUnexpectedEOF
  444. }
  445. m.LogId = string(dAtA[iNdEx:postIndex])
  446. iNdEx = postIndex
  447. case 2:
  448. if wireType != 2 {
  449. return fmt.Errorf("proto: wrong wireType = %d for field OuterId", wireType)
  450. }
  451. var stringLen uint64
  452. for shift := uint(0); ; shift += 7 {
  453. if shift >= 64 {
  454. return ErrIntOverflowStreamEvent
  455. }
  456. if iNdEx >= l {
  457. return io.ErrUnexpectedEOF
  458. }
  459. b := dAtA[iNdEx]
  460. iNdEx++
  461. stringLen |= (uint64(b) & 0x7F) << shift
  462. if b < 0x80 {
  463. break
  464. }
  465. }
  466. intStringLen := int(stringLen)
  467. if intStringLen < 0 {
  468. return ErrInvalidLengthStreamEvent
  469. }
  470. postIndex := iNdEx + intStringLen
  471. if postIndex > l {
  472. return io.ErrUnexpectedEOF
  473. }
  474. m.OuterId = string(dAtA[iNdEx:postIndex])
  475. iNdEx = postIndex
  476. case 3:
  477. if wireType != 2 {
  478. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  479. }
  480. var msglen int
  481. for shift := uint(0); ; shift += 7 {
  482. if shift >= 64 {
  483. return ErrIntOverflowStreamEvent
  484. }
  485. if iNdEx >= l {
  486. return io.ErrUnexpectedEOF
  487. }
  488. b := dAtA[iNdEx]
  489. iNdEx++
  490. msglen |= (int(b) & 0x7F) << shift
  491. if b < 0x80 {
  492. break
  493. }
  494. }
  495. if msglen < 0 {
  496. return ErrInvalidLengthStreamEvent
  497. }
  498. postIndex := iNdEx + msglen
  499. if postIndex > l {
  500. return io.ErrUnexpectedEOF
  501. }
  502. if m.Header == nil {
  503. m.Header = make(map[string]string)
  504. }
  505. var mapkey string
  506. var mapvalue string
  507. for iNdEx < postIndex {
  508. entryPreIndex := iNdEx
  509. var wire uint64
  510. for shift := uint(0); ; shift += 7 {
  511. if shift >= 64 {
  512. return ErrIntOverflowStreamEvent
  513. }
  514. if iNdEx >= l {
  515. return io.ErrUnexpectedEOF
  516. }
  517. b := dAtA[iNdEx]
  518. iNdEx++
  519. wire |= (uint64(b) & 0x7F) << shift
  520. if b < 0x80 {
  521. break
  522. }
  523. }
  524. fieldNum := int32(wire >> 3)
  525. if fieldNum == 1 {
  526. var stringLenmapkey uint64
  527. for shift := uint(0); ; shift += 7 {
  528. if shift >= 64 {
  529. return ErrIntOverflowStreamEvent
  530. }
  531. if iNdEx >= l {
  532. return io.ErrUnexpectedEOF
  533. }
  534. b := dAtA[iNdEx]
  535. iNdEx++
  536. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  537. if b < 0x80 {
  538. break
  539. }
  540. }
  541. intStringLenmapkey := int(stringLenmapkey)
  542. if intStringLenmapkey < 0 {
  543. return ErrInvalidLengthStreamEvent
  544. }
  545. postStringIndexmapkey := iNdEx + intStringLenmapkey
  546. if postStringIndexmapkey > l {
  547. return io.ErrUnexpectedEOF
  548. }
  549. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  550. iNdEx = postStringIndexmapkey
  551. } else if fieldNum == 2 {
  552. var stringLenmapvalue uint64
  553. for shift := uint(0); ; shift += 7 {
  554. if shift >= 64 {
  555. return ErrIntOverflowStreamEvent
  556. }
  557. if iNdEx >= l {
  558. return io.ErrUnexpectedEOF
  559. }
  560. b := dAtA[iNdEx]
  561. iNdEx++
  562. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  563. if b < 0x80 {
  564. break
  565. }
  566. }
  567. intStringLenmapvalue := int(stringLenmapvalue)
  568. if intStringLenmapvalue < 0 {
  569. return ErrInvalidLengthStreamEvent
  570. }
  571. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  572. if postStringIndexmapvalue > l {
  573. return io.ErrUnexpectedEOF
  574. }
  575. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  576. iNdEx = postStringIndexmapvalue
  577. } else {
  578. iNdEx = entryPreIndex
  579. skippy, err := skipStreamEvent(dAtA[iNdEx:])
  580. if err != nil {
  581. return err
  582. }
  583. if skippy < 0 {
  584. return ErrInvalidLengthStreamEvent
  585. }
  586. if (iNdEx + skippy) > postIndex {
  587. return io.ErrUnexpectedEOF
  588. }
  589. iNdEx += skippy
  590. }
  591. }
  592. m.Header[mapkey] = mapvalue
  593. iNdEx = postIndex
  594. case 4:
  595. if wireType != 2 {
  596. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  597. }
  598. var byteLen int
  599. for shift := uint(0); ; shift += 7 {
  600. if shift >= 64 {
  601. return ErrIntOverflowStreamEvent
  602. }
  603. if iNdEx >= l {
  604. return io.ErrUnexpectedEOF
  605. }
  606. b := dAtA[iNdEx]
  607. iNdEx++
  608. byteLen |= (int(b) & 0x7F) << shift
  609. if b < 0x80 {
  610. break
  611. }
  612. }
  613. if byteLen < 0 {
  614. return ErrInvalidLengthStreamEvent
  615. }
  616. postIndex := iNdEx + byteLen
  617. if postIndex > l {
  618. return io.ErrUnexpectedEOF
  619. }
  620. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  621. if m.Data == nil {
  622. m.Data = []byte{}
  623. }
  624. iNdEx = postIndex
  625. default:
  626. iNdEx = preIndex
  627. skippy, err := skipStreamEvent(dAtA[iNdEx:])
  628. if err != nil {
  629. return err
  630. }
  631. if skippy < 0 {
  632. return ErrInvalidLengthStreamEvent
  633. }
  634. if (iNdEx + skippy) > l {
  635. return io.ErrUnexpectedEOF
  636. }
  637. iNdEx += skippy
  638. }
  639. }
  640. if iNdEx > l {
  641. return io.ErrUnexpectedEOF
  642. }
  643. return nil
  644. }
  645. func (m *EventList) Unmarshal(dAtA []byte) error {
  646. l := len(dAtA)
  647. iNdEx := 0
  648. for iNdEx < l {
  649. preIndex := iNdEx
  650. var wire uint64
  651. for shift := uint(0); ; shift += 7 {
  652. if shift >= 64 {
  653. return ErrIntOverflowStreamEvent
  654. }
  655. if iNdEx >= l {
  656. return io.ErrUnexpectedEOF
  657. }
  658. b := dAtA[iNdEx]
  659. iNdEx++
  660. wire |= (uint64(b) & 0x7F) << shift
  661. if b < 0x80 {
  662. break
  663. }
  664. }
  665. fieldNum := int32(wire >> 3)
  666. wireType := int(wire & 0x7)
  667. if wireType == 4 {
  668. return fmt.Errorf("proto: EventList: wiretype end group for non-group")
  669. }
  670. if fieldNum <= 0 {
  671. return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire)
  672. }
  673. switch fieldNum {
  674. case 1:
  675. if wireType != 2 {
  676. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  677. }
  678. var msglen int
  679. for shift := uint(0); ; shift += 7 {
  680. if shift >= 64 {
  681. return ErrIntOverflowStreamEvent
  682. }
  683. if iNdEx >= l {
  684. return io.ErrUnexpectedEOF
  685. }
  686. b := dAtA[iNdEx]
  687. iNdEx++
  688. msglen |= (int(b) & 0x7F) << shift
  689. if b < 0x80 {
  690. break
  691. }
  692. }
  693. if msglen < 0 {
  694. return ErrInvalidLengthStreamEvent
  695. }
  696. postIndex := iNdEx + msglen
  697. if postIndex > l {
  698. return io.ErrUnexpectedEOF
  699. }
  700. m.Events = append(m.Events, &SimpleEvent{})
  701. if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  702. return err
  703. }
  704. iNdEx = postIndex
  705. default:
  706. iNdEx = preIndex
  707. skippy, err := skipStreamEvent(dAtA[iNdEx:])
  708. if err != nil {
  709. return err
  710. }
  711. if skippy < 0 {
  712. return ErrInvalidLengthStreamEvent
  713. }
  714. if (iNdEx + skippy) > l {
  715. return io.ErrUnexpectedEOF
  716. }
  717. iNdEx += skippy
  718. }
  719. }
  720. if iNdEx > l {
  721. return io.ErrUnexpectedEOF
  722. }
  723. return nil
  724. }
  725. func (m *Response) Unmarshal(dAtA []byte) error {
  726. l := len(dAtA)
  727. iNdEx := 0
  728. for iNdEx < l {
  729. preIndex := iNdEx
  730. var wire uint64
  731. for shift := uint(0); ; shift += 7 {
  732. if shift >= 64 {
  733. return ErrIntOverflowStreamEvent
  734. }
  735. if iNdEx >= l {
  736. return io.ErrUnexpectedEOF
  737. }
  738. b := dAtA[iNdEx]
  739. iNdEx++
  740. wire |= (uint64(b) & 0x7F) << shift
  741. if b < 0x80 {
  742. break
  743. }
  744. }
  745. fieldNum := int32(wire >> 3)
  746. wireType := int(wire & 0x7)
  747. if wireType == 4 {
  748. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  749. }
  750. if fieldNum <= 0 {
  751. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  752. }
  753. switch fieldNum {
  754. case 1:
  755. if wireType != 0 {
  756. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  757. }
  758. m.Code = 0
  759. for shift := uint(0); ; shift += 7 {
  760. if shift >= 64 {
  761. return ErrIntOverflowStreamEvent
  762. }
  763. if iNdEx >= l {
  764. return io.ErrUnexpectedEOF
  765. }
  766. b := dAtA[iNdEx]
  767. iNdEx++
  768. m.Code |= (StatusCode(b) & 0x7F) << shift
  769. if b < 0x80 {
  770. break
  771. }
  772. }
  773. case 2:
  774. if wireType != 2 {
  775. return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
  776. }
  777. var stringLen uint64
  778. for shift := uint(0); ; shift += 7 {
  779. if shift >= 64 {
  780. return ErrIntOverflowStreamEvent
  781. }
  782. if iNdEx >= l {
  783. return io.ErrUnexpectedEOF
  784. }
  785. b := dAtA[iNdEx]
  786. iNdEx++
  787. stringLen |= (uint64(b) & 0x7F) << shift
  788. if b < 0x80 {
  789. break
  790. }
  791. }
  792. intStringLen := int(stringLen)
  793. if intStringLen < 0 {
  794. return ErrInvalidLengthStreamEvent
  795. }
  796. postIndex := iNdEx + intStringLen
  797. if postIndex > l {
  798. return io.ErrUnexpectedEOF
  799. }
  800. m.Msg = string(dAtA[iNdEx:postIndex])
  801. iNdEx = postIndex
  802. default:
  803. iNdEx = preIndex
  804. skippy, err := skipStreamEvent(dAtA[iNdEx:])
  805. if err != nil {
  806. return err
  807. }
  808. if skippy < 0 {
  809. return ErrInvalidLengthStreamEvent
  810. }
  811. if (iNdEx + skippy) > l {
  812. return io.ErrUnexpectedEOF
  813. }
  814. iNdEx += skippy
  815. }
  816. }
  817. if iNdEx > l {
  818. return io.ErrUnexpectedEOF
  819. }
  820. return nil
  821. }
  822. func skipStreamEvent(dAtA []byte) (n int, err error) {
  823. l := len(dAtA)
  824. iNdEx := 0
  825. for iNdEx < l {
  826. var wire uint64
  827. for shift := uint(0); ; shift += 7 {
  828. if shift >= 64 {
  829. return 0, ErrIntOverflowStreamEvent
  830. }
  831. if iNdEx >= l {
  832. return 0, io.ErrUnexpectedEOF
  833. }
  834. b := dAtA[iNdEx]
  835. iNdEx++
  836. wire |= (uint64(b) & 0x7F) << shift
  837. if b < 0x80 {
  838. break
  839. }
  840. }
  841. wireType := int(wire & 0x7)
  842. switch wireType {
  843. case 0:
  844. for shift := uint(0); ; shift += 7 {
  845. if shift >= 64 {
  846. return 0, ErrIntOverflowStreamEvent
  847. }
  848. if iNdEx >= l {
  849. return 0, io.ErrUnexpectedEOF
  850. }
  851. iNdEx++
  852. if dAtA[iNdEx-1] < 0x80 {
  853. break
  854. }
  855. }
  856. return iNdEx, nil
  857. case 1:
  858. iNdEx += 8
  859. return iNdEx, nil
  860. case 2:
  861. var length int
  862. for shift := uint(0); ; shift += 7 {
  863. if shift >= 64 {
  864. return 0, ErrIntOverflowStreamEvent
  865. }
  866. if iNdEx >= l {
  867. return 0, io.ErrUnexpectedEOF
  868. }
  869. b := dAtA[iNdEx]
  870. iNdEx++
  871. length |= (int(b) & 0x7F) << shift
  872. if b < 0x80 {
  873. break
  874. }
  875. }
  876. iNdEx += length
  877. if length < 0 {
  878. return 0, ErrInvalidLengthStreamEvent
  879. }
  880. return iNdEx, nil
  881. case 3:
  882. for {
  883. var innerWire uint64
  884. var start int = iNdEx
  885. for shift := uint(0); ; shift += 7 {
  886. if shift >= 64 {
  887. return 0, ErrIntOverflowStreamEvent
  888. }
  889. if iNdEx >= l {
  890. return 0, io.ErrUnexpectedEOF
  891. }
  892. b := dAtA[iNdEx]
  893. iNdEx++
  894. innerWire |= (uint64(b) & 0x7F) << shift
  895. if b < 0x80 {
  896. break
  897. }
  898. }
  899. innerWireType := int(innerWire & 0x7)
  900. if innerWireType == 4 {
  901. break
  902. }
  903. next, err := skipStreamEvent(dAtA[start:])
  904. if err != nil {
  905. return 0, err
  906. }
  907. iNdEx = start + next
  908. }
  909. return iNdEx, nil
  910. case 4:
  911. return iNdEx, nil
  912. case 5:
  913. iNdEx += 4
  914. return iNdEx, nil
  915. default:
  916. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  917. }
  918. }
  919. panic("unreachable")
  920. }
  921. var (
  922. ErrInvalidLengthStreamEvent = fmt.Errorf("proto: negative length found during unmarshaling")
  923. ErrIntOverflowStreamEvent = fmt.Errorf("proto: integer overflow")
  924. )
  925. func init() {
  926. proto.RegisterFile("app/service/ops/log-agent/output/lancergrpc/lancergateway/StreamEvent.proto", fileDescriptorStreamEvent)
  927. }
  928. var fileDescriptorStreamEvent = []byte{
  929. // 437 bytes of a gzipped FileDescriptorProto
  930. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x52, 0xd1, 0x8a, 0xd3, 0x40,
  931. 0x14, 0xdd, 0xd9, 0xc6, 0x6e, 0x7b, 0x5b, 0x4a, 0x19, 0x7c, 0x08, 0x7d, 0xa8, 0xb5, 0x2a, 0x14,
  932. 0x61, 0x27, 0x1a, 0x15, 0x54, 0xf0, 0x41, 0x6b, 0xd5, 0xc5, 0xa2, 0x92, 0xb0, 0xe0, 0x9b, 0x4c,
  933. 0x93, 0x6b, 0x36, 0x98, 0x64, 0x86, 0x99, 0x49, 0xa5, 0x1f, 0xe5, 0x2f, 0xf8, 0xbc, 0x8f, 0x7e,
  934. 0x82, 0xf4, 0x4b, 0x64, 0xa6, 0xa9, 0xdb, 0x3e, 0x04, 0xce, 0x99, 0x73, 0xb8, 0xe7, 0x5c, 0x72,
  935. 0xe1, 0x23, 0x97, 0x32, 0xd0, 0xa8, 0xd6, 0x79, 0x82, 0x81, 0x90, 0x3a, 0x28, 0x44, 0x76, 0xce,
  936. 0x33, 0xac, 0x4c, 0x20, 0x6a, 0x23, 0x6b, 0x13, 0x14, 0xbc, 0x4a, 0x50, 0x65, 0x4a, 0x26, 0x7b,
  937. 0xc8, 0x0d, 0xfe, 0xe4, 0x9b, 0x20, 0x36, 0x0a, 0x79, 0xb9, 0x58, 0x63, 0x65, 0x98, 0x54, 0xc2,
  938. 0x88, 0xd1, 0x79, 0x96, 0x9b, 0xab, 0x7a, 0xc5, 0x12, 0x51, 0x06, 0x99, 0xc8, 0x44, 0xe0, 0x9e,
  939. 0x57, 0xf5, 0x77, 0xc7, 0x1c, 0x71, 0x68, 0x67, 0x9f, 0xfe, 0x26, 0xd0, 0x8b, 0xf3, 0x52, 0x16,
  940. 0xe8, 0x86, 0xd0, 0xdb, 0x70, 0xab, 0x10, 0xd9, 0x45, 0xea, 0x93, 0x09, 0x99, 0x75, 0xa3, 0x1d,
  941. 0xa1, 0x3e, 0x9c, 0x89, 0xda, 0xa0, 0xba, 0x48, 0xfd, 0x53, 0xf7, 0xbe, 0xa7, 0xf4, 0x11, 0xb4,
  942. 0xaf, 0x90, 0xa7, 0xa8, 0xfc, 0xd6, 0xa4, 0x35, 0xeb, 0x85, 0x3e, 0x3b, 0x98, 0xc6, 0x3e, 0x38,
  943. 0x69, 0x51, 0x19, 0xb5, 0x89, 0x1a, 0x1f, 0xa5, 0xe0, 0xa5, 0xdc, 0x70, 0xdf, 0x9b, 0x90, 0x59,
  944. 0x3f, 0x72, 0x78, 0xf4, 0x02, 0x7a, 0x07, 0x56, 0x3a, 0x84, 0xd6, 0x0f, 0xdc, 0x34, 0x15, 0x2c,
  945. 0xb4, 0xb5, 0xd6, 0xbc, 0xa8, 0xb1, 0x89, 0xdf, 0x91, 0x97, 0xa7, 0xcf, 0xc9, 0xf4, 0x31, 0x74,
  946. 0x5d, 0xd6, 0x32, 0xd7, 0x86, 0xde, 0x87, 0x36, 0x5a, 0xa2, 0x7d, 0xe2, 0xda, 0xf4, 0x0f, 0xdb,
  947. 0x44, 0x8d, 0x36, 0x7d, 0x05, 0x9d, 0x08, 0xb5, 0x14, 0x95, 0x46, 0x7a, 0x07, 0xbc, 0x44, 0xa4,
  948. 0xe8, 0xb2, 0x06, 0x61, 0x8f, 0xc5, 0x86, 0x9b, 0x5a, 0xcf, 0x45, 0x8a, 0x91, 0x13, 0x6c, 0x97,
  949. 0x52, 0x67, 0x4d, 0xae, 0x85, 0x0f, 0x9f, 0x02, 0xdc, 0xb8, 0x68, 0x07, 0xbc, 0x4f, 0x97, 0xcb,
  950. 0xe5, 0xf0, 0x84, 0xf6, 0xe1, 0x2c, 0xbe, 0x9c, 0xcf, 0x17, 0x71, 0x3c, 0xbc, 0x26, 0x74, 0x00,
  951. 0xdd, 0xe5, 0xe7, 0xd7, 0x6f, 0xbf, 0xbd, 0xb3, 0xe2, 0xaf, 0x56, 0xf8, 0x15, 0x06, 0xef, 0x77,
  952. 0x3f, 0x2d, 0x8c, 0x51, 0xad, 0x51, 0xd1, 0x7b, 0xd0, 0xd1, 0x58, 0xa5, 0xae, 0x38, 0xb0, 0xff,
  953. 0x4b, 0x8c, 0xba, 0x6c, 0xdf, 0x6e, 0x7a, 0x42, 0xef, 0x82, 0x67, 0x4d, 0xf4, 0x68, 0x93, 0x23,
  954. 0xcb, 0x9b, 0x67, 0xd7, 0xdb, 0x31, 0xf9, 0xb3, 0x1d, 0x93, 0xbf, 0xdb, 0x31, 0x81, 0x07, 0x89,
  955. 0x28, 0xd9, 0x2a, 0x2f, 0x72, 0xfb, 0xb1, 0xe6, 0x4e, 0x42, 0x7b, 0x0e, 0xa5, 0xa8, 0xd8, 0xfe,
  956. 0x18, 0xbe, 0x90, 0x55, 0xdb, 0xe1, 0x27, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0x44, 0xe9,
  957. 0xca, 0x7e, 0x02, 0x00, 0x00,
  958. }