You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

859 lines
32 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. // Code generated by protoc-gen-go.
  2. // source: messaging.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package messaging_pb is a generated protocol buffer package.
  6. It is generated from these files:
  7. messaging.proto
  8. It has these top-level messages:
  9. SubscriberMessage
  10. RawData
  11. Message
  12. BrokerMessage
  13. PublishRequest
  14. PublishResponse
  15. ConfigureTopicRequest
  16. ConfigureTopicResponse
  17. GetTopicConfigurationRequest
  18. GetTopicConfigurationResponse
  19. TopicConfiguration
  20. */
  21. package messaging_pb
  22. import proto "github.com/golang/protobuf/proto"
  23. import fmt "fmt"
  24. import math "math"
  25. import (
  26. context "golang.org/x/net/context"
  27. grpc "google.golang.org/grpc"
  28. )
  29. // Reference imports to suppress errors if they are not otherwise used.
  30. var _ = proto.Marshal
  31. var _ = fmt.Errorf
  32. var _ = math.Inf
  33. // This is a compile-time assertion to ensure that this generated file
  34. // is compatible with the proto package it is being compiled against.
  35. // A compilation error at this line likely means your copy of the
  36. // proto package needs to be updated.
  37. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  38. type SubscriberMessage_InitMessage_StartPosition int32
  39. const (
  40. SubscriberMessage_InitMessage_LATEST SubscriberMessage_InitMessage_StartPosition = 0
  41. SubscriberMessage_InitMessage_EARLIEST SubscriberMessage_InitMessage_StartPosition = 1
  42. SubscriberMessage_InitMessage_TIMESTAMP SubscriberMessage_InitMessage_StartPosition = 2
  43. )
  44. var SubscriberMessage_InitMessage_StartPosition_name = map[int32]string{
  45. 0: "LATEST",
  46. 1: "EARLIEST",
  47. 2: "TIMESTAMP",
  48. }
  49. var SubscriberMessage_InitMessage_StartPosition_value = map[string]int32{
  50. "LATEST": 0,
  51. "EARLIEST": 1,
  52. "TIMESTAMP": 2,
  53. }
  54. func (x SubscriberMessage_InitMessage_StartPosition) String() string {
  55. return proto.EnumName(SubscriberMessage_InitMessage_StartPosition_name, int32(x))
  56. }
  57. func (SubscriberMessage_InitMessage_StartPosition) EnumDescriptor() ([]byte, []int) {
  58. return fileDescriptor0, []int{0, 0, 0}
  59. }
  60. type SubscriberMessage struct {
  61. Init *SubscriberMessage_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
  62. Ack *SubscriberMessage_AckMessage `protobuf:"bytes,2,opt,name=ack" json:"ack,omitempty"`
  63. }
  64. func (m *SubscriberMessage) Reset() { *m = SubscriberMessage{} }
  65. func (m *SubscriberMessage) String() string { return proto.CompactTextString(m) }
  66. func (*SubscriberMessage) ProtoMessage() {}
  67. func (*SubscriberMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  68. func (m *SubscriberMessage) GetInit() *SubscriberMessage_InitMessage {
  69. if m != nil {
  70. return m.Init
  71. }
  72. return nil
  73. }
  74. func (m *SubscriberMessage) GetAck() *SubscriberMessage_AckMessage {
  75. if m != nil {
  76. return m.Ack
  77. }
  78. return nil
  79. }
  80. type SubscriberMessage_InitMessage struct {
  81. Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
  82. Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
  83. Partition int32 `protobuf:"varint,3,opt,name=partition" json:"partition,omitempty"`
  84. StartPosition SubscriberMessage_InitMessage_StartPosition `protobuf:"varint,4,opt,name=startPosition,enum=messaging_pb.SubscriberMessage_InitMessage_StartPosition" json:"startPosition,omitempty"`
  85. TimestampNs int64 `protobuf:"varint,5,opt,name=timestampNs" json:"timestampNs,omitempty"`
  86. SubscriberId string `protobuf:"bytes,6,opt,name=subscriber_id,json=subscriberId" json:"subscriber_id,omitempty"`
  87. }
  88. func (m *SubscriberMessage_InitMessage) Reset() { *m = SubscriberMessage_InitMessage{} }
  89. func (m *SubscriberMessage_InitMessage) String() string { return proto.CompactTextString(m) }
  90. func (*SubscriberMessage_InitMessage) ProtoMessage() {}
  91. func (*SubscriberMessage_InitMessage) Descriptor() ([]byte, []int) {
  92. return fileDescriptor0, []int{0, 0}
  93. }
  94. func (m *SubscriberMessage_InitMessage) GetNamespace() string {
  95. if m != nil {
  96. return m.Namespace
  97. }
  98. return ""
  99. }
  100. func (m *SubscriberMessage_InitMessage) GetTopic() string {
  101. if m != nil {
  102. return m.Topic
  103. }
  104. return ""
  105. }
  106. func (m *SubscriberMessage_InitMessage) GetPartition() int32 {
  107. if m != nil {
  108. return m.Partition
  109. }
  110. return 0
  111. }
  112. func (m *SubscriberMessage_InitMessage) GetStartPosition() SubscriberMessage_InitMessage_StartPosition {
  113. if m != nil {
  114. return m.StartPosition
  115. }
  116. return SubscriberMessage_InitMessage_LATEST
  117. }
  118. func (m *SubscriberMessage_InitMessage) GetTimestampNs() int64 {
  119. if m != nil {
  120. return m.TimestampNs
  121. }
  122. return 0
  123. }
  124. func (m *SubscriberMessage_InitMessage) GetSubscriberId() string {
  125. if m != nil {
  126. return m.SubscriberId
  127. }
  128. return ""
  129. }
  130. type SubscriberMessage_AckMessage struct {
  131. MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId" json:"message_id,omitempty"`
  132. }
  133. func (m *SubscriberMessage_AckMessage) Reset() { *m = SubscriberMessage_AckMessage{} }
  134. func (m *SubscriberMessage_AckMessage) String() string { return proto.CompactTextString(m) }
  135. func (*SubscriberMessage_AckMessage) ProtoMessage() {}
  136. func (*SubscriberMessage_AckMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} }
  137. func (m *SubscriberMessage_AckMessage) GetMessageId() int64 {
  138. if m != nil {
  139. return m.MessageId
  140. }
  141. return 0
  142. }
  143. type RawData struct {
  144. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  145. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  146. Headers map[string][]byte `protobuf:"bytes,3,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
  147. }
  148. func (m *RawData) Reset() { *m = RawData{} }
  149. func (m *RawData) String() string { return proto.CompactTextString(m) }
  150. func (*RawData) ProtoMessage() {}
  151. func (*RawData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  152. func (m *RawData) GetKey() []byte {
  153. if m != nil {
  154. return m.Key
  155. }
  156. return nil
  157. }
  158. func (m *RawData) GetValue() []byte {
  159. if m != nil {
  160. return m.Value
  161. }
  162. return nil
  163. }
  164. func (m *RawData) GetHeaders() map[string][]byte {
  165. if m != nil {
  166. return m.Headers
  167. }
  168. return nil
  169. }
  170. type Message struct {
  171. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
  172. Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
  173. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
  174. Headers map[string][]byte `protobuf:"bytes,4,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
  175. }
  176. func (m *Message) Reset() { *m = Message{} }
  177. func (m *Message) String() string { return proto.CompactTextString(m) }
  178. func (*Message) ProtoMessage() {}
  179. func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  180. func (m *Message) GetTimestamp() int64 {
  181. if m != nil {
  182. return m.Timestamp
  183. }
  184. return 0
  185. }
  186. func (m *Message) GetKey() []byte {
  187. if m != nil {
  188. return m.Key
  189. }
  190. return nil
  191. }
  192. func (m *Message) GetValue() []byte {
  193. if m != nil {
  194. return m.Value
  195. }
  196. return nil
  197. }
  198. func (m *Message) GetHeaders() map[string][]byte {
  199. if m != nil {
  200. return m.Headers
  201. }
  202. return nil
  203. }
  204. type BrokerMessage struct {
  205. Data *Message `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
  206. Redirect *BrokerMessage_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
  207. }
  208. func (m *BrokerMessage) Reset() { *m = BrokerMessage{} }
  209. func (m *BrokerMessage) String() string { return proto.CompactTextString(m) }
  210. func (*BrokerMessage) ProtoMessage() {}
  211. func (*BrokerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  212. func (m *BrokerMessage) GetData() *Message {
  213. if m != nil {
  214. return m.Data
  215. }
  216. return nil
  217. }
  218. func (m *BrokerMessage) GetRedirect() *BrokerMessage_RedirectMessage {
  219. if m != nil {
  220. return m.Redirect
  221. }
  222. return nil
  223. }
  224. type BrokerMessage_RedirectMessage struct {
  225. NewBroker string `protobuf:"bytes,1,opt,name=new_broker,json=newBroker" json:"new_broker,omitempty"`
  226. }
  227. func (m *BrokerMessage_RedirectMessage) Reset() { *m = BrokerMessage_RedirectMessage{} }
  228. func (m *BrokerMessage_RedirectMessage) String() string { return proto.CompactTextString(m) }
  229. func (*BrokerMessage_RedirectMessage) ProtoMessage() {}
  230. func (*BrokerMessage_RedirectMessage) Descriptor() ([]byte, []int) {
  231. return fileDescriptor0, []int{3, 0}
  232. }
  233. func (m *BrokerMessage_RedirectMessage) GetNewBroker() string {
  234. if m != nil {
  235. return m.NewBroker
  236. }
  237. return ""
  238. }
  239. type PublishRequest struct {
  240. Init *PublishRequest_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
  241. Data *PublishRequest_RawData `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
  242. }
  243. func (m *PublishRequest) Reset() { *m = PublishRequest{} }
  244. func (m *PublishRequest) String() string { return proto.CompactTextString(m) }
  245. func (*PublishRequest) ProtoMessage() {}
  246. func (*PublishRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  247. func (m *PublishRequest) GetInit() *PublishRequest_InitMessage {
  248. if m != nil {
  249. return m.Init
  250. }
  251. return nil
  252. }
  253. func (m *PublishRequest) GetData() *PublishRequest_RawData {
  254. if m != nil {
  255. return m.Data
  256. }
  257. return nil
  258. }
  259. type PublishRequest_InitMessage struct {
  260. Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
  261. Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
  262. Partition int32 `protobuf:"varint,3,opt,name=partition" json:"partition,omitempty"`
  263. }
  264. func (m *PublishRequest_InitMessage) Reset() { *m = PublishRequest_InitMessage{} }
  265. func (m *PublishRequest_InitMessage) String() string { return proto.CompactTextString(m) }
  266. func (*PublishRequest_InitMessage) ProtoMessage() {}
  267. func (*PublishRequest_InitMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
  268. func (m *PublishRequest_InitMessage) GetNamespace() string {
  269. if m != nil {
  270. return m.Namespace
  271. }
  272. return ""
  273. }
  274. func (m *PublishRequest_InitMessage) GetTopic() string {
  275. if m != nil {
  276. return m.Topic
  277. }
  278. return ""
  279. }
  280. func (m *PublishRequest_InitMessage) GetPartition() int32 {
  281. if m != nil {
  282. return m.Partition
  283. }
  284. return 0
  285. }
  286. type PublishRequest_RawData struct {
  287. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  288. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  289. Headers map[string][]byte `protobuf:"bytes,3,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
  290. }
  291. func (m *PublishRequest_RawData) Reset() { *m = PublishRequest_RawData{} }
  292. func (m *PublishRequest_RawData) String() string { return proto.CompactTextString(m) }
  293. func (*PublishRequest_RawData) ProtoMessage() {}
  294. func (*PublishRequest_RawData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 1} }
  295. func (m *PublishRequest_RawData) GetKey() []byte {
  296. if m != nil {
  297. return m.Key
  298. }
  299. return nil
  300. }
  301. func (m *PublishRequest_RawData) GetValue() []byte {
  302. if m != nil {
  303. return m.Value
  304. }
  305. return nil
  306. }
  307. func (m *PublishRequest_RawData) GetHeaders() map[string][]byte {
  308. if m != nil {
  309. return m.Headers
  310. }
  311. return nil
  312. }
  313. type PublishResponse struct {
  314. Config *PublishResponse_ConfigMessage `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
  315. Redirect *PublishResponse_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
  316. }
  317. func (m *PublishResponse) Reset() { *m = PublishResponse{} }
  318. func (m *PublishResponse) String() string { return proto.CompactTextString(m) }
  319. func (*PublishResponse) ProtoMessage() {}
  320. func (*PublishResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  321. func (m *PublishResponse) GetConfig() *PublishResponse_ConfigMessage {
  322. if m != nil {
  323. return m.Config
  324. }
  325. return nil
  326. }
  327. func (m *PublishResponse) GetRedirect() *PublishResponse_RedirectMessage {
  328. if m != nil {
  329. return m.Redirect
  330. }
  331. return nil
  332. }
  333. type PublishResponse_ConfigMessage struct {
  334. PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
  335. }
  336. func (m *PublishResponse_ConfigMessage) Reset() { *m = PublishResponse_ConfigMessage{} }
  337. func (m *PublishResponse_ConfigMessage) String() string { return proto.CompactTextString(m) }
  338. func (*PublishResponse_ConfigMessage) ProtoMessage() {}
  339. func (*PublishResponse_ConfigMessage) Descriptor() ([]byte, []int) {
  340. return fileDescriptor0, []int{5, 0}
  341. }
  342. func (m *PublishResponse_ConfigMessage) GetPartitionCount() int32 {
  343. if m != nil {
  344. return m.PartitionCount
  345. }
  346. return 0
  347. }
  348. type PublishResponse_RedirectMessage struct {
  349. NewBroker string `protobuf:"bytes,1,opt,name=new_broker,json=newBroker" json:"new_broker,omitempty"`
  350. }
  351. func (m *PublishResponse_RedirectMessage) Reset() { *m = PublishResponse_RedirectMessage{} }
  352. func (m *PublishResponse_RedirectMessage) String() string { return proto.CompactTextString(m) }
  353. func (*PublishResponse_RedirectMessage) ProtoMessage() {}
  354. func (*PublishResponse_RedirectMessage) Descriptor() ([]byte, []int) {
  355. return fileDescriptor0, []int{5, 1}
  356. }
  357. func (m *PublishResponse_RedirectMessage) GetNewBroker() string {
  358. if m != nil {
  359. return m.NewBroker
  360. }
  361. return ""
  362. }
  363. type ConfigureTopicRequest struct {
  364. Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
  365. Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
  366. Configuration *TopicConfiguration `protobuf:"bytes,3,opt,name=configuration" json:"configuration,omitempty"`
  367. }
  368. func (m *ConfigureTopicRequest) Reset() { *m = ConfigureTopicRequest{} }
  369. func (m *ConfigureTopicRequest) String() string { return proto.CompactTextString(m) }
  370. func (*ConfigureTopicRequest) ProtoMessage() {}
  371. func (*ConfigureTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
  372. func (m *ConfigureTopicRequest) GetNamespace() string {
  373. if m != nil {
  374. return m.Namespace
  375. }
  376. return ""
  377. }
  378. func (m *ConfigureTopicRequest) GetTopic() string {
  379. if m != nil {
  380. return m.Topic
  381. }
  382. return ""
  383. }
  384. func (m *ConfigureTopicRequest) GetConfiguration() *TopicConfiguration {
  385. if m != nil {
  386. return m.Configuration
  387. }
  388. return nil
  389. }
  390. type ConfigureTopicResponse struct {
  391. }
  392. func (m *ConfigureTopicResponse) Reset() { *m = ConfigureTopicResponse{} }
  393. func (m *ConfigureTopicResponse) String() string { return proto.CompactTextString(m) }
  394. func (*ConfigureTopicResponse) ProtoMessage() {}
  395. func (*ConfigureTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
  396. type GetTopicConfigurationRequest struct {
  397. Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
  398. Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
  399. }
  400. func (m *GetTopicConfigurationRequest) Reset() { *m = GetTopicConfigurationRequest{} }
  401. func (m *GetTopicConfigurationRequest) String() string { return proto.CompactTextString(m) }
  402. func (*GetTopicConfigurationRequest) ProtoMessage() {}
  403. func (*GetTopicConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
  404. func (m *GetTopicConfigurationRequest) GetNamespace() string {
  405. if m != nil {
  406. return m.Namespace
  407. }
  408. return ""
  409. }
  410. func (m *GetTopicConfigurationRequest) GetTopic() string {
  411. if m != nil {
  412. return m.Topic
  413. }
  414. return ""
  415. }
  416. type GetTopicConfigurationResponse struct {
  417. Configuration *TopicConfiguration `protobuf:"bytes,1,opt,name=configuration" json:"configuration,omitempty"`
  418. }
  419. func (m *GetTopicConfigurationResponse) Reset() { *m = GetTopicConfigurationResponse{} }
  420. func (m *GetTopicConfigurationResponse) String() string { return proto.CompactTextString(m) }
  421. func (*GetTopicConfigurationResponse) ProtoMessage() {}
  422. func (*GetTopicConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
  423. func (m *GetTopicConfigurationResponse) GetConfiguration() *TopicConfiguration {
  424. if m != nil {
  425. return m.Configuration
  426. }
  427. return nil
  428. }
  429. type TopicConfiguration struct {
  430. PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
  431. Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"`
  432. Replication string `protobuf:"bytes,3,opt,name=replication" json:"replication,omitempty"`
  433. }
  434. func (m *TopicConfiguration) Reset() { *m = TopicConfiguration{} }
  435. func (m *TopicConfiguration) String() string { return proto.CompactTextString(m) }
  436. func (*TopicConfiguration) ProtoMessage() {}
  437. func (*TopicConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
  438. func (m *TopicConfiguration) GetPartitionCount() int32 {
  439. if m != nil {
  440. return m.PartitionCount
  441. }
  442. return 0
  443. }
  444. func (m *TopicConfiguration) GetCollection() string {
  445. if m != nil {
  446. return m.Collection
  447. }
  448. return ""
  449. }
  450. func (m *TopicConfiguration) GetReplication() string {
  451. if m != nil {
  452. return m.Replication
  453. }
  454. return ""
  455. }
  456. func init() {
  457. proto.RegisterType((*SubscriberMessage)(nil), "messaging_pb.SubscriberMessage")
  458. proto.RegisterType((*SubscriberMessage_InitMessage)(nil), "messaging_pb.SubscriberMessage.InitMessage")
  459. proto.RegisterType((*SubscriberMessage_AckMessage)(nil), "messaging_pb.SubscriberMessage.AckMessage")
  460. proto.RegisterType((*RawData)(nil), "messaging_pb.RawData")
  461. proto.RegisterType((*Message)(nil), "messaging_pb.Message")
  462. proto.RegisterType((*BrokerMessage)(nil), "messaging_pb.BrokerMessage")
  463. proto.RegisterType((*BrokerMessage_RedirectMessage)(nil), "messaging_pb.BrokerMessage.RedirectMessage")
  464. proto.RegisterType((*PublishRequest)(nil), "messaging_pb.PublishRequest")
  465. proto.RegisterType((*PublishRequest_InitMessage)(nil), "messaging_pb.PublishRequest.InitMessage")
  466. proto.RegisterType((*PublishRequest_RawData)(nil), "messaging_pb.PublishRequest.RawData")
  467. proto.RegisterType((*PublishResponse)(nil), "messaging_pb.PublishResponse")
  468. proto.RegisterType((*PublishResponse_ConfigMessage)(nil), "messaging_pb.PublishResponse.ConfigMessage")
  469. proto.RegisterType((*PublishResponse_RedirectMessage)(nil), "messaging_pb.PublishResponse.RedirectMessage")
  470. proto.RegisterType((*ConfigureTopicRequest)(nil), "messaging_pb.ConfigureTopicRequest")
  471. proto.RegisterType((*ConfigureTopicResponse)(nil), "messaging_pb.ConfigureTopicResponse")
  472. proto.RegisterType((*GetTopicConfigurationRequest)(nil), "messaging_pb.GetTopicConfigurationRequest")
  473. proto.RegisterType((*GetTopicConfigurationResponse)(nil), "messaging_pb.GetTopicConfigurationResponse")
  474. proto.RegisterType((*TopicConfiguration)(nil), "messaging_pb.TopicConfiguration")
  475. proto.RegisterEnum("messaging_pb.SubscriberMessage_InitMessage_StartPosition", SubscriberMessage_InitMessage_StartPosition_name, SubscriberMessage_InitMessage_StartPosition_value)
  476. }
  477. // Reference imports to suppress errors if they are not otherwise used.
  478. var _ context.Context
  479. var _ grpc.ClientConn
  480. // This is a compile-time assertion to ensure that this generated file
  481. // is compatible with the grpc package it is being compiled against.
  482. const _ = grpc.SupportPackageIsVersion4
  483. // Client API for SeaweedMessaging service
  484. type SeaweedMessagingClient interface {
  485. Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error)
  486. Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error)
  487. ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error)
  488. GetTopicConfiguration(ctx context.Context, in *GetTopicConfigurationRequest, opts ...grpc.CallOption) (*GetTopicConfigurationResponse, error)
  489. }
  490. type seaweedMessagingClient struct {
  491. cc *grpc.ClientConn
  492. }
  493. func NewSeaweedMessagingClient(cc *grpc.ClientConn) SeaweedMessagingClient {
  494. return &seaweedMessagingClient{cc}
  495. }
  496. func (c *seaweedMessagingClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) {
  497. stream, err := grpc.NewClientStream(ctx, &_SeaweedMessaging_serviceDesc.Streams[0], c.cc, "/messaging_pb.SeaweedMessaging/Subscribe", opts...)
  498. if err != nil {
  499. return nil, err
  500. }
  501. x := &seaweedMessagingSubscribeClient{stream}
  502. return x, nil
  503. }
  504. type SeaweedMessaging_SubscribeClient interface {
  505. Send(*SubscriberMessage) error
  506. Recv() (*BrokerMessage, error)
  507. grpc.ClientStream
  508. }
  509. type seaweedMessagingSubscribeClient struct {
  510. grpc.ClientStream
  511. }
  512. func (x *seaweedMessagingSubscribeClient) Send(m *SubscriberMessage) error {
  513. return x.ClientStream.SendMsg(m)
  514. }
  515. func (x *seaweedMessagingSubscribeClient) Recv() (*BrokerMessage, error) {
  516. m := new(BrokerMessage)
  517. if err := x.ClientStream.RecvMsg(m); err != nil {
  518. return nil, err
  519. }
  520. return m, nil
  521. }
  522. func (c *seaweedMessagingClient) Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error) {
  523. stream, err := grpc.NewClientStream(ctx, &_SeaweedMessaging_serviceDesc.Streams[1], c.cc, "/messaging_pb.SeaweedMessaging/Publish", opts...)
  524. if err != nil {
  525. return nil, err
  526. }
  527. x := &seaweedMessagingPublishClient{stream}
  528. return x, nil
  529. }
  530. type SeaweedMessaging_PublishClient interface {
  531. Send(*PublishRequest) error
  532. Recv() (*PublishResponse, error)
  533. grpc.ClientStream
  534. }
  535. type seaweedMessagingPublishClient struct {
  536. grpc.ClientStream
  537. }
  538. func (x *seaweedMessagingPublishClient) Send(m *PublishRequest) error {
  539. return x.ClientStream.SendMsg(m)
  540. }
  541. func (x *seaweedMessagingPublishClient) Recv() (*PublishResponse, error) {
  542. m := new(PublishResponse)
  543. if err := x.ClientStream.RecvMsg(m); err != nil {
  544. return nil, err
  545. }
  546. return m, nil
  547. }
  548. func (c *seaweedMessagingClient) ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error) {
  549. out := new(ConfigureTopicResponse)
  550. err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/ConfigureTopic", in, out, c.cc, opts...)
  551. if err != nil {
  552. return nil, err
  553. }
  554. return out, nil
  555. }
  556. func (c *seaweedMessagingClient) GetTopicConfiguration(ctx context.Context, in *GetTopicConfigurationRequest, opts ...grpc.CallOption) (*GetTopicConfigurationResponse, error) {
  557. out := new(GetTopicConfigurationResponse)
  558. err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/GetTopicConfiguration", in, out, c.cc, opts...)
  559. if err != nil {
  560. return nil, err
  561. }
  562. return out, nil
  563. }
  564. // Server API for SeaweedMessaging service
  565. type SeaweedMessagingServer interface {
  566. Subscribe(SeaweedMessaging_SubscribeServer) error
  567. Publish(SeaweedMessaging_PublishServer) error
  568. ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error)
  569. GetTopicConfiguration(context.Context, *GetTopicConfigurationRequest) (*GetTopicConfigurationResponse, error)
  570. }
  571. func RegisterSeaweedMessagingServer(s *grpc.Server, srv SeaweedMessagingServer) {
  572. s.RegisterService(&_SeaweedMessaging_serviceDesc, srv)
  573. }
  574. func _SeaweedMessaging_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
  575. return srv.(SeaweedMessagingServer).Subscribe(&seaweedMessagingSubscribeServer{stream})
  576. }
  577. type SeaweedMessaging_SubscribeServer interface {
  578. Send(*BrokerMessage) error
  579. Recv() (*SubscriberMessage, error)
  580. grpc.ServerStream
  581. }
  582. type seaweedMessagingSubscribeServer struct {
  583. grpc.ServerStream
  584. }
  585. func (x *seaweedMessagingSubscribeServer) Send(m *BrokerMessage) error {
  586. return x.ServerStream.SendMsg(m)
  587. }
  588. func (x *seaweedMessagingSubscribeServer) Recv() (*SubscriberMessage, error) {
  589. m := new(SubscriberMessage)
  590. if err := x.ServerStream.RecvMsg(m); err != nil {
  591. return nil, err
  592. }
  593. return m, nil
  594. }
  595. func _SeaweedMessaging_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
  596. return srv.(SeaweedMessagingServer).Publish(&seaweedMessagingPublishServer{stream})
  597. }
  598. type SeaweedMessaging_PublishServer interface {
  599. Send(*PublishResponse) error
  600. Recv() (*PublishRequest, error)
  601. grpc.ServerStream
  602. }
  603. type seaweedMessagingPublishServer struct {
  604. grpc.ServerStream
  605. }
  606. func (x *seaweedMessagingPublishServer) Send(m *PublishResponse) error {
  607. return x.ServerStream.SendMsg(m)
  608. }
  609. func (x *seaweedMessagingPublishServer) Recv() (*PublishRequest, error) {
  610. m := new(PublishRequest)
  611. if err := x.ServerStream.RecvMsg(m); err != nil {
  612. return nil, err
  613. }
  614. return m, nil
  615. }
  616. func _SeaweedMessaging_ConfigureTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  617. in := new(ConfigureTopicRequest)
  618. if err := dec(in); err != nil {
  619. return nil, err
  620. }
  621. if interceptor == nil {
  622. return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, in)
  623. }
  624. info := &grpc.UnaryServerInfo{
  625. Server: srv,
  626. FullMethod: "/messaging_pb.SeaweedMessaging/ConfigureTopic",
  627. }
  628. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  629. return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, req.(*ConfigureTopicRequest))
  630. }
  631. return interceptor(ctx, in, info, handler)
  632. }
  633. func _SeaweedMessaging_GetTopicConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  634. in := new(GetTopicConfigurationRequest)
  635. if err := dec(in); err != nil {
  636. return nil, err
  637. }
  638. if interceptor == nil {
  639. return srv.(SeaweedMessagingServer).GetTopicConfiguration(ctx, in)
  640. }
  641. info := &grpc.UnaryServerInfo{
  642. Server: srv,
  643. FullMethod: "/messaging_pb.SeaweedMessaging/GetTopicConfiguration",
  644. }
  645. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  646. return srv.(SeaweedMessagingServer).GetTopicConfiguration(ctx, req.(*GetTopicConfigurationRequest))
  647. }
  648. return interceptor(ctx, in, info, handler)
  649. }
  650. var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
  651. ServiceName: "messaging_pb.SeaweedMessaging",
  652. HandlerType: (*SeaweedMessagingServer)(nil),
  653. Methods: []grpc.MethodDesc{
  654. {
  655. MethodName: "ConfigureTopic",
  656. Handler: _SeaweedMessaging_ConfigureTopic_Handler,
  657. },
  658. {
  659. MethodName: "GetTopicConfiguration",
  660. Handler: _SeaweedMessaging_GetTopicConfiguration_Handler,
  661. },
  662. },
  663. Streams: []grpc.StreamDesc{
  664. {
  665. StreamName: "Subscribe",
  666. Handler: _SeaweedMessaging_Subscribe_Handler,
  667. ServerStreams: true,
  668. ClientStreams: true,
  669. },
  670. {
  671. StreamName: "Publish",
  672. Handler: _SeaweedMessaging_Publish_Handler,
  673. ServerStreams: true,
  674. ClientStreams: true,
  675. },
  676. },
  677. Metadata: "messaging.proto",
  678. }
  679. func init() { proto.RegisterFile("messaging.proto", fileDescriptor0) }
  680. var fileDescriptor0 = []byte{
  681. // 847 bytes of a gzipped FileDescriptorProto
  682. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x8e, 0xe3, 0x44,
  683. 0x10, 0xde, 0x8e, 0x33, 0x93, 0x75, 0xe5, 0x97, 0x16, 0x83, 0x22, 0x33, 0x03, 0x96, 0x77, 0x25,
  684. 0x02, 0x23, 0xac, 0x21, 0x5c, 0xc2, 0x6a, 0x25, 0x94, 0x84, 0xb0, 0x44, 0x4c, 0x20, 0xea, 0xe4,
  685. 0x8a, 0xa2, 0x8e, 0xd3, 0x9b, 0xb5, 0x92, 0xd8, 0xc6, 0xdd, 0x21, 0xda, 0x13, 0x07, 0xb8, 0x72,
  686. 0xe2, 0x1d, 0xb8, 0x70, 0xe6, 0xc2, 0x8d, 0x07, 0xe0, 0x9d, 0x90, 0x7f, 0x63, 0x27, 0x1e, 0xef,
  687. 0x10, 0xed, 0xdc, 0xec, 0x72, 0xd5, 0x57, 0xf5, 0x55, 0x7d, 0xd5, 0x6e, 0xa8, 0x6f, 0x18, 0xe7,
  688. 0x74, 0x69, 0x5a, 0x4b, 0xdd, 0x71, 0x6d, 0x61, 0xe3, 0x4a, 0x6c, 0x98, 0x39, 0x73, 0xed, 0x97,
  689. 0x22, 0xbc, 0x33, 0xd9, 0xce, 0xb9, 0xe1, 0x9a, 0x73, 0xe6, 0x8e, 0xfc, 0x4f, 0x0c, 0x7f, 0x09,
  690. 0x45, 0xd3, 0x32, 0x45, 0x13, 0xa9, 0xa8, 0x55, 0x6e, 0x5f, 0xeb, 0xc9, 0x10, 0xfd, 0xc8, 0x5d,
  691. 0x1f, 0x5a, 0xa6, 0x08, 0x9f, 0x89, 0x1f, 0x88, 0x9f, 0x83, 0x44, 0x8d, 0x55, 0xb3, 0xe0, 0xc7,
  692. 0x7f, 0xf2, 0xa6, 0xf8, 0xae, 0xb1, 0x8a, 0xc2, 0xbd, 0x30, 0xe5, 0x9f, 0x02, 0x94, 0x13, 0x98,
  693. 0xf8, 0x12, 0x64, 0x8b, 0x6e, 0x18, 0x77, 0xa8, 0xc1, 0xfc, 0x9a, 0x64, 0xb2, 0x37, 0xe0, 0x77,
  694. 0xe1, 0x4c, 0xd8, 0x8e, 0x69, 0xf8, 0xd9, 0x64, 0x12, 0xbc, 0x78, 0x31, 0x0e, 0x75, 0x85, 0x29,
  695. 0x4c, 0xdb, 0x6a, 0x4a, 0x2a, 0x6a, 0x9d, 0x91, 0xbd, 0x01, 0xcf, 0xa0, 0xca, 0x05, 0x75, 0xc5,
  696. 0xd8, 0xe6, 0x81, 0x47, 0x51, 0x45, 0xad, 0x5a, 0xfb, 0x8b, 0xff, 0xc1, 0x54, 0x9f, 0x24, 0x01,
  697. 0x48, 0x1a, 0x0f, 0xab, 0x50, 0x16, 0xe6, 0x86, 0x71, 0x41, 0x37, 0xce, 0x77, 0xbc, 0x79, 0xa6,
  698. 0xa2, 0x96, 0x44, 0x92, 0x26, 0xfc, 0x04, 0xaa, 0x3c, 0xc6, 0x9f, 0x99, 0x8b, 0xe6, 0xb9, 0x5f,
  699. 0x7e, 0x65, 0x6f, 0x1c, 0x2e, 0xb4, 0x0e, 0x54, 0x53, 0x69, 0x30, 0xc0, 0xf9, 0x6d, 0x77, 0x3a,
  700. 0x98, 0x4c, 0x1b, 0x8f, 0x70, 0x05, 0x1e, 0x0f, 0xba, 0xe4, 0x76, 0xe8, 0xbd, 0x21, 0x5c, 0x05,
  701. 0x79, 0x3a, 0x1c, 0x0d, 0x26, 0xd3, 0xee, 0x68, 0xdc, 0x28, 0x28, 0xd7, 0x00, 0xfb, 0xb6, 0xe2,
  702. 0x2b, 0x80, 0x80, 0x19, 0xf3, 0x32, 0x21, 0xbf, 0x1a, 0x39, 0xb4, 0x0c, 0x17, 0xda, 0x9f, 0x08,
  703. 0x4a, 0x84, 0xee, 0xbe, 0xa2, 0x82, 0xe2, 0x06, 0x48, 0x2b, 0xf6, 0xda, 0xf7, 0xa9, 0x10, 0xef,
  704. 0xd1, 0x6b, 0xf0, 0x4f, 0x74, 0xbd, 0x65, 0x7e, 0x83, 0x2b, 0x24, 0x78, 0xc1, 0xcf, 0xa1, 0xf4,
  705. 0x8a, 0xd1, 0x05, 0x73, 0x79, 0x53, 0x52, 0xa5, 0x56, 0xb9, 0xad, 0xa5, 0x9b, 0x17, 0xe2, 0xe9,
  706. 0xdf, 0x04, 0x4e, 0x03, 0x4b, 0xb8, 0xaf, 0x49, 0x14, 0xa2, 0x3c, 0x83, 0x4a, 0xf2, 0x43, 0x32,
  707. 0xab, 0x9c, 0x93, 0xf5, 0x59, 0xa1, 0x83, 0xb4, 0x7f, 0x11, 0x94, 0x22, 0x62, 0x2a, 0xc8, 0x71,
  708. 0x53, 0x03, 0x5e, 0xbd, 0xc2, 0x0d, 0x22, 0x7b, 0x63, 0x84, 0x5c, 0xc8, 0xe0, 0x23, 0xdd, 0xc1,
  709. 0xa7, 0x98, 0xc5, 0x27, 0x1a, 0xfb, 0xdb, 0xe7, 0xf3, 0x17, 0x82, 0x6a, 0xcf, 0xb5, 0x57, 0xfb,
  710. 0xfd, 0xfb, 0x18, 0x8a, 0x0b, 0x2a, 0x68, 0xb8, 0x7f, 0x17, 0x99, 0x85, 0x10, 0xdf, 0x05, 0xbf,
  711. 0x80, 0xc7, 0x2e, 0x5b, 0x98, 0x2e, 0x33, 0x44, 0xb8, 0x6e, 0x07, 0xeb, 0x9a, 0x42, 0xd6, 0x49,
  712. 0xe8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, 0x45, 0xfd,
  734. 0xfc, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xc7, 0xa8, 0xba, 0xb5, 0x0a, 0x00, 0x00,
  735. }