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.

824 lines
31 KiB

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