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.

799 lines
30 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. EventTimeNs int64 `protobuf:"varint,1,opt,name=event_time_ns,json=eventTimeNs" json:"event_time_ns,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) GetEventTimeNs() int64 {
  153. if m != nil {
  154. return m.EventTimeNs
  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 *Message `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() *Message {
  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 PublishResponse struct {
  259. Config *PublishResponse_ConfigMessage `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
  260. Redirect *PublishResponse_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
  261. }
  262. func (m *PublishResponse) Reset() { *m = PublishResponse{} }
  263. func (m *PublishResponse) String() string { return proto.CompactTextString(m) }
  264. func (*PublishResponse) ProtoMessage() {}
  265. func (*PublishResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  266. func (m *PublishResponse) GetConfig() *PublishResponse_ConfigMessage {
  267. if m != nil {
  268. return m.Config
  269. }
  270. return nil
  271. }
  272. func (m *PublishResponse) GetRedirect() *PublishResponse_RedirectMessage {
  273. if m != nil {
  274. return m.Redirect
  275. }
  276. return nil
  277. }
  278. type PublishResponse_ConfigMessage struct {
  279. PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
  280. }
  281. func (m *PublishResponse_ConfigMessage) Reset() { *m = PublishResponse_ConfigMessage{} }
  282. func (m *PublishResponse_ConfigMessage) String() string { return proto.CompactTextString(m) }
  283. func (*PublishResponse_ConfigMessage) ProtoMessage() {}
  284. func (*PublishResponse_ConfigMessage) Descriptor() ([]byte, []int) {
  285. return fileDescriptor0, []int{4, 0}
  286. }
  287. func (m *PublishResponse_ConfigMessage) GetPartitionCount() int32 {
  288. if m != nil {
  289. return m.PartitionCount
  290. }
  291. return 0
  292. }
  293. type PublishResponse_RedirectMessage struct {
  294. NewBroker string `protobuf:"bytes,1,opt,name=new_broker,json=newBroker" json:"new_broker,omitempty"`
  295. }
  296. func (m *PublishResponse_RedirectMessage) Reset() { *m = PublishResponse_RedirectMessage{} }
  297. func (m *PublishResponse_RedirectMessage) String() string { return proto.CompactTextString(m) }
  298. func (*PublishResponse_RedirectMessage) ProtoMessage() {}
  299. func (*PublishResponse_RedirectMessage) Descriptor() ([]byte, []int) {
  300. return fileDescriptor0, []int{4, 1}
  301. }
  302. func (m *PublishResponse_RedirectMessage) GetNewBroker() string {
  303. if m != nil {
  304. return m.NewBroker
  305. }
  306. return ""
  307. }
  308. type ConfigureTopicRequest struct {
  309. Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
  310. Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
  311. Configuration *TopicConfiguration `protobuf:"bytes,3,opt,name=configuration" json:"configuration,omitempty"`
  312. }
  313. func (m *ConfigureTopicRequest) Reset() { *m = ConfigureTopicRequest{} }
  314. func (m *ConfigureTopicRequest) String() string { return proto.CompactTextString(m) }
  315. func (*ConfigureTopicRequest) ProtoMessage() {}
  316. func (*ConfigureTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  317. func (m *ConfigureTopicRequest) GetNamespace() string {
  318. if m != nil {
  319. return m.Namespace
  320. }
  321. return ""
  322. }
  323. func (m *ConfigureTopicRequest) GetTopic() string {
  324. if m != nil {
  325. return m.Topic
  326. }
  327. return ""
  328. }
  329. func (m *ConfigureTopicRequest) GetConfiguration() *TopicConfiguration {
  330. if m != nil {
  331. return m.Configuration
  332. }
  333. return nil
  334. }
  335. type ConfigureTopicResponse struct {
  336. }
  337. func (m *ConfigureTopicResponse) Reset() { *m = ConfigureTopicResponse{} }
  338. func (m *ConfigureTopicResponse) String() string { return proto.CompactTextString(m) }
  339. func (*ConfigureTopicResponse) ProtoMessage() {}
  340. func (*ConfigureTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
  341. type GetTopicConfigurationRequest struct {
  342. Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
  343. Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
  344. }
  345. func (m *GetTopicConfigurationRequest) Reset() { *m = GetTopicConfigurationRequest{} }
  346. func (m *GetTopicConfigurationRequest) String() string { return proto.CompactTextString(m) }
  347. func (*GetTopicConfigurationRequest) ProtoMessage() {}
  348. func (*GetTopicConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
  349. func (m *GetTopicConfigurationRequest) GetNamespace() string {
  350. if m != nil {
  351. return m.Namespace
  352. }
  353. return ""
  354. }
  355. func (m *GetTopicConfigurationRequest) GetTopic() string {
  356. if m != nil {
  357. return m.Topic
  358. }
  359. return ""
  360. }
  361. type GetTopicConfigurationResponse struct {
  362. Configuration *TopicConfiguration `protobuf:"bytes,1,opt,name=configuration" json:"configuration,omitempty"`
  363. }
  364. func (m *GetTopicConfigurationResponse) Reset() { *m = GetTopicConfigurationResponse{} }
  365. func (m *GetTopicConfigurationResponse) String() string { return proto.CompactTextString(m) }
  366. func (*GetTopicConfigurationResponse) ProtoMessage() {}
  367. func (*GetTopicConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
  368. func (m *GetTopicConfigurationResponse) GetConfiguration() *TopicConfiguration {
  369. if m != nil {
  370. return m.Configuration
  371. }
  372. return nil
  373. }
  374. type TopicConfiguration struct {
  375. PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
  376. Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"`
  377. Replication string `protobuf:"bytes,3,opt,name=replication" json:"replication,omitempty"`
  378. IsTransient bool `protobuf:"varint,4,opt,name=is_transient,json=isTransient" json:"is_transient,omitempty"`
  379. }
  380. func (m *TopicConfiguration) Reset() { *m = TopicConfiguration{} }
  381. func (m *TopicConfiguration) String() string { return proto.CompactTextString(m) }
  382. func (*TopicConfiguration) ProtoMessage() {}
  383. func (*TopicConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
  384. func (m *TopicConfiguration) GetPartitionCount() int32 {
  385. if m != nil {
  386. return m.PartitionCount
  387. }
  388. return 0
  389. }
  390. func (m *TopicConfiguration) GetCollection() string {
  391. if m != nil {
  392. return m.Collection
  393. }
  394. return ""
  395. }
  396. func (m *TopicConfiguration) GetReplication() string {
  397. if m != nil {
  398. return m.Replication
  399. }
  400. return ""
  401. }
  402. func (m *TopicConfiguration) GetIsTransient() bool {
  403. if m != nil {
  404. return m.IsTransient
  405. }
  406. return false
  407. }
  408. func init() {
  409. proto.RegisterType((*SubscriberMessage)(nil), "messaging_pb.SubscriberMessage")
  410. proto.RegisterType((*SubscriberMessage_InitMessage)(nil), "messaging_pb.SubscriberMessage.InitMessage")
  411. proto.RegisterType((*SubscriberMessage_AckMessage)(nil), "messaging_pb.SubscriberMessage.AckMessage")
  412. proto.RegisterType((*Message)(nil), "messaging_pb.Message")
  413. proto.RegisterType((*BrokerMessage)(nil), "messaging_pb.BrokerMessage")
  414. proto.RegisterType((*BrokerMessage_RedirectMessage)(nil), "messaging_pb.BrokerMessage.RedirectMessage")
  415. proto.RegisterType((*PublishRequest)(nil), "messaging_pb.PublishRequest")
  416. proto.RegisterType((*PublishRequest_InitMessage)(nil), "messaging_pb.PublishRequest.InitMessage")
  417. proto.RegisterType((*PublishResponse)(nil), "messaging_pb.PublishResponse")
  418. proto.RegisterType((*PublishResponse_ConfigMessage)(nil), "messaging_pb.PublishResponse.ConfigMessage")
  419. proto.RegisterType((*PublishResponse_RedirectMessage)(nil), "messaging_pb.PublishResponse.RedirectMessage")
  420. proto.RegisterType((*ConfigureTopicRequest)(nil), "messaging_pb.ConfigureTopicRequest")
  421. proto.RegisterType((*ConfigureTopicResponse)(nil), "messaging_pb.ConfigureTopicResponse")
  422. proto.RegisterType((*GetTopicConfigurationRequest)(nil), "messaging_pb.GetTopicConfigurationRequest")
  423. proto.RegisterType((*GetTopicConfigurationResponse)(nil), "messaging_pb.GetTopicConfigurationResponse")
  424. proto.RegisterType((*TopicConfiguration)(nil), "messaging_pb.TopicConfiguration")
  425. proto.RegisterEnum("messaging_pb.SubscriberMessage_InitMessage_StartPosition", SubscriberMessage_InitMessage_StartPosition_name, SubscriberMessage_InitMessage_StartPosition_value)
  426. }
  427. // Reference imports to suppress errors if they are not otherwise used.
  428. var _ context.Context
  429. var _ grpc.ClientConn
  430. // This is a compile-time assertion to ensure that this generated file
  431. // is compatible with the grpc package it is being compiled against.
  432. const _ = grpc.SupportPackageIsVersion4
  433. // Client API for SeaweedMessaging service
  434. type SeaweedMessagingClient interface {
  435. Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error)
  436. Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error)
  437. ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error)
  438. GetTopicConfiguration(ctx context.Context, in *GetTopicConfigurationRequest, opts ...grpc.CallOption) (*GetTopicConfigurationResponse, error)
  439. }
  440. type seaweedMessagingClient struct {
  441. cc *grpc.ClientConn
  442. }
  443. func NewSeaweedMessagingClient(cc *grpc.ClientConn) SeaweedMessagingClient {
  444. return &seaweedMessagingClient{cc}
  445. }
  446. func (c *seaweedMessagingClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) {
  447. stream, err := grpc.NewClientStream(ctx, &_SeaweedMessaging_serviceDesc.Streams[0], c.cc, "/messaging_pb.SeaweedMessaging/Subscribe", opts...)
  448. if err != nil {
  449. return nil, err
  450. }
  451. x := &seaweedMessagingSubscribeClient{stream}
  452. return x, nil
  453. }
  454. type SeaweedMessaging_SubscribeClient interface {
  455. Send(*SubscriberMessage) error
  456. Recv() (*BrokerMessage, error)
  457. grpc.ClientStream
  458. }
  459. type seaweedMessagingSubscribeClient struct {
  460. grpc.ClientStream
  461. }
  462. func (x *seaweedMessagingSubscribeClient) Send(m *SubscriberMessage) error {
  463. return x.ClientStream.SendMsg(m)
  464. }
  465. func (x *seaweedMessagingSubscribeClient) Recv() (*BrokerMessage, error) {
  466. m := new(BrokerMessage)
  467. if err := x.ClientStream.RecvMsg(m); err != nil {
  468. return nil, err
  469. }
  470. return m, nil
  471. }
  472. func (c *seaweedMessagingClient) Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error) {
  473. stream, err := grpc.NewClientStream(ctx, &_SeaweedMessaging_serviceDesc.Streams[1], c.cc, "/messaging_pb.SeaweedMessaging/Publish", opts...)
  474. if err != nil {
  475. return nil, err
  476. }
  477. x := &seaweedMessagingPublishClient{stream}
  478. return x, nil
  479. }
  480. type SeaweedMessaging_PublishClient interface {
  481. Send(*PublishRequest) error
  482. Recv() (*PublishResponse, error)
  483. grpc.ClientStream
  484. }
  485. type seaweedMessagingPublishClient struct {
  486. grpc.ClientStream
  487. }
  488. func (x *seaweedMessagingPublishClient) Send(m *PublishRequest) error {
  489. return x.ClientStream.SendMsg(m)
  490. }
  491. func (x *seaweedMessagingPublishClient) Recv() (*PublishResponse, error) {
  492. m := new(PublishResponse)
  493. if err := x.ClientStream.RecvMsg(m); err != nil {
  494. return nil, err
  495. }
  496. return m, nil
  497. }
  498. func (c *seaweedMessagingClient) ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error) {
  499. out := new(ConfigureTopicResponse)
  500. err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/ConfigureTopic", in, out, c.cc, opts...)
  501. if err != nil {
  502. return nil, err
  503. }
  504. return out, nil
  505. }
  506. func (c *seaweedMessagingClient) GetTopicConfiguration(ctx context.Context, in *GetTopicConfigurationRequest, opts ...grpc.CallOption) (*GetTopicConfigurationResponse, error) {
  507. out := new(GetTopicConfigurationResponse)
  508. err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/GetTopicConfiguration", in, out, c.cc, opts...)
  509. if err != nil {
  510. return nil, err
  511. }
  512. return out, nil
  513. }
  514. // Server API for SeaweedMessaging service
  515. type SeaweedMessagingServer interface {
  516. Subscribe(SeaweedMessaging_SubscribeServer) error
  517. Publish(SeaweedMessaging_PublishServer) error
  518. ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error)
  519. GetTopicConfiguration(context.Context, *GetTopicConfigurationRequest) (*GetTopicConfigurationResponse, error)
  520. }
  521. func RegisterSeaweedMessagingServer(s *grpc.Server, srv SeaweedMessagingServer) {
  522. s.RegisterService(&_SeaweedMessaging_serviceDesc, srv)
  523. }
  524. func _SeaweedMessaging_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
  525. return srv.(SeaweedMessagingServer).Subscribe(&seaweedMessagingSubscribeServer{stream})
  526. }
  527. type SeaweedMessaging_SubscribeServer interface {
  528. Send(*BrokerMessage) error
  529. Recv() (*SubscriberMessage, error)
  530. grpc.ServerStream
  531. }
  532. type seaweedMessagingSubscribeServer struct {
  533. grpc.ServerStream
  534. }
  535. func (x *seaweedMessagingSubscribeServer) Send(m *BrokerMessage) error {
  536. return x.ServerStream.SendMsg(m)
  537. }
  538. func (x *seaweedMessagingSubscribeServer) Recv() (*SubscriberMessage, error) {
  539. m := new(SubscriberMessage)
  540. if err := x.ServerStream.RecvMsg(m); err != nil {
  541. return nil, err
  542. }
  543. return m, nil
  544. }
  545. func _SeaweedMessaging_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
  546. return srv.(SeaweedMessagingServer).Publish(&seaweedMessagingPublishServer{stream})
  547. }
  548. type SeaweedMessaging_PublishServer interface {
  549. Send(*PublishResponse) error
  550. Recv() (*PublishRequest, error)
  551. grpc.ServerStream
  552. }
  553. type seaweedMessagingPublishServer struct {
  554. grpc.ServerStream
  555. }
  556. func (x *seaweedMessagingPublishServer) Send(m *PublishResponse) error {
  557. return x.ServerStream.SendMsg(m)
  558. }
  559. func (x *seaweedMessagingPublishServer) Recv() (*PublishRequest, error) {
  560. m := new(PublishRequest)
  561. if err := x.ServerStream.RecvMsg(m); err != nil {
  562. return nil, err
  563. }
  564. return m, nil
  565. }
  566. func _SeaweedMessaging_ConfigureTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  567. in := new(ConfigureTopicRequest)
  568. if err := dec(in); err != nil {
  569. return nil, err
  570. }
  571. if interceptor == nil {
  572. return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, in)
  573. }
  574. info := &grpc.UnaryServerInfo{
  575. Server: srv,
  576. FullMethod: "/messaging_pb.SeaweedMessaging/ConfigureTopic",
  577. }
  578. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  579. return srv.(SeaweedMessagingServer).ConfigureTopic(ctx, req.(*ConfigureTopicRequest))
  580. }
  581. return interceptor(ctx, in, info, handler)
  582. }
  583. func _SeaweedMessaging_GetTopicConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  584. in := new(GetTopicConfigurationRequest)
  585. if err := dec(in); err != nil {
  586. return nil, err
  587. }
  588. if interceptor == nil {
  589. return srv.(SeaweedMessagingServer).GetTopicConfiguration(ctx, in)
  590. }
  591. info := &grpc.UnaryServerInfo{
  592. Server: srv,
  593. FullMethod: "/messaging_pb.SeaweedMessaging/GetTopicConfiguration",
  594. }
  595. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  596. return srv.(SeaweedMessagingServer).GetTopicConfiguration(ctx, req.(*GetTopicConfigurationRequest))
  597. }
  598. return interceptor(ctx, in, info, handler)
  599. }
  600. var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
  601. ServiceName: "messaging_pb.SeaweedMessaging",
  602. HandlerType: (*SeaweedMessagingServer)(nil),
  603. Methods: []grpc.MethodDesc{
  604. {
  605. MethodName: "ConfigureTopic",
  606. Handler: _SeaweedMessaging_ConfigureTopic_Handler,
  607. },
  608. {
  609. MethodName: "GetTopicConfiguration",
  610. Handler: _SeaweedMessaging_GetTopicConfiguration_Handler,
  611. },
  612. },
  613. Streams: []grpc.StreamDesc{
  614. {
  615. StreamName: "Subscribe",
  616. Handler: _SeaweedMessaging_Subscribe_Handler,
  617. ServerStreams: true,
  618. ClientStreams: true,
  619. },
  620. {
  621. StreamName: "Publish",
  622. Handler: _SeaweedMessaging_Publish_Handler,
  623. ServerStreams: true,
  624. ClientStreams: true,
  625. },
  626. },
  627. Metadata: "messaging.proto",
  628. }
  629. func init() { proto.RegisterFile("messaging.proto", fileDescriptor0) }
  630. var fileDescriptor0 = []byte{
  631. // 832 bytes of a gzipped FileDescriptorProto
  632. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0x5d, 0x8f, 0xea, 0x44,
  633. 0x18, 0x3e, 0x53, 0x3e, 0x76, 0x79, 0xa1, 0x80, 0x13, 0xd7, 0x90, 0xba, 0xab, 0xd8, 0x63, 0x14,
  634. 0xdd, 0xd8, 0x6c, 0xf0, 0x66, 0x3d, 0x39, 0x89, 0x01, 0x82, 0x47, 0x92, 0xe5, 0x48, 0x06, 0x6e,
  635. 0x4d, 0x53, 0xca, 0x1c, 0x76, 0x02, 0xb4, 0xb5, 0x33, 0xec, 0x66, 0xaf, 0xf5, 0xd6, 0x2b, 0xff,
  636. 0x81, 0xff, 0xc1, 0x1f, 0xe0, 0x6f, 0xf0, 0xce, 0x5f, 0x63, 0x3a, 0xfd, 0xa0, 0x05, 0x96, 0x5d,
  637. 0x49, 0xce, 0x5d, 0xfb, 0xce, 0xf3, 0x3c, 0xef, 0xf7, 0xb4, 0x50, 0x5b, 0x51, 0xce, 0xad, 0x39,
  638. 0x73, 0xe6, 0x86, 0xe7, 0xbb, 0xc2, 0xc5, 0x95, 0xc4, 0x60, 0x7a, 0x53, 0xfd, 0xd7, 0x3c, 0x7c,
  639. 0x30, 0x5e, 0x4f, 0xb9, 0xed, 0xb3, 0x29, 0xf5, 0x87, 0xf2, 0x88, 0xe2, 0xef, 0x21, 0xcf, 0x1c,
  640. 0x26, 0x1a, 0xa8, 0x89, 0x5a, 0xe5, 0xf6, 0xa5, 0x91, 0xa6, 0x18, 0x3b, 0x70, 0x63, 0xe0, 0x30,
  641. 0x11, 0x3d, 0x13, 0x49, 0xc4, 0xaf, 0x21, 0x67, 0xd9, 0x8b, 0x86, 0x22, 0xf9, 0x5f, 0x3f, 0xc5,
  642. 0xef, 0xd8, 0x8b, 0x98, 0x1e, 0xd0, 0xb4, 0xbf, 0x15, 0x28, 0xa7, 0x34, 0xf1, 0x39, 0x94, 0x1c,
  643. 0x6b, 0x45, 0xb9, 0x67, 0xd9, 0x54, 0xc6, 0x54, 0x22, 0x1b, 0x03, 0xfe, 0x10, 0x0a, 0xc2, 0xf5,
  644. 0x98, 0x2d, 0xbd, 0x95, 0x48, 0xf8, 0x12, 0x70, 0x3c, 0xcb, 0x17, 0x4c, 0x30, 0xd7, 0x69, 0xe4,
  645. 0x9a, 0xa8, 0x55, 0x20, 0x1b, 0x03, 0x36, 0x41, 0xe5, 0xc2, 0xf2, 0xc5, 0xc8, 0xe5, 0x21, 0x22,
  646. 0xdf, 0x44, 0xad, 0x6a, 0xfb, 0xbb, 0xff, 0x91, 0xa9, 0x31, 0x4e, 0x0b, 0x90, 0xac, 0x1e, 0x6e,
  647. 0x42, 0x59, 0xb0, 0x15, 0xe5, 0xc2, 0x5a, 0x79, 0x6f, 0x79, 0xa3, 0xd0, 0x44, 0xad, 0x1c, 0x49,
  648. 0x9b, 0xf0, 0x4b, 0x50, 0x79, 0xa2, 0x6f, 0xb2, 0x59, 0xa3, 0x28, 0xc3, 0xaf, 0x6c, 0x8c, 0x83,
  649. 0x99, 0x7e, 0x0d, 0x6a, 0xc6, 0x0d, 0x06, 0x28, 0xde, 0x74, 0x26, 0xfd, 0xf1, 0xa4, 0xfe, 0x02,
  650. 0x57, 0xe0, 0xb4, 0xdf, 0x21, 0x37, 0x83, 0xe0, 0x0d, 0x61, 0x15, 0x4a, 0x93, 0xc1, 0xb0, 0x3f,
  651. 0x9e, 0x74, 0x86, 0xa3, 0xba, 0xa2, 0x5d, 0x02, 0x6c, 0xca, 0x8a, 0x2f, 0x00, 0xc2, 0xcc, 0x68,
  652. 0xe0, 0x09, 0xc9, 0x68, 0x4a, 0x91, 0x65, 0x30, 0xd3, 0xff, 0x41, 0x70, 0x12, 0x43, 0xbf, 0x00,
  653. 0x95, 0xde, 0x51, 0x47, 0x98, 0x41, 0xb0, 0xa6, 0xc3, 0x43, 0x74, 0x57, 0xb9, 0x42, 0xa4, 0x2c,
  654. 0x0f, 0x26, 0x6c, 0x45, 0xdf, 0x72, 0x5c, 0x87, 0xdc, 0x82, 0x3e, 0xc8, 0xa2, 0x57, 0x48, 0xf0,
  655. 0x18, 0x34, 0xe2, 0xce, 0x5a, 0xae, 0xa9, 0x2c, 0x77, 0x85, 0x84, 0x2f, 0xf8, 0x35, 0x9c, 0xdc,
  656. 0x52, 0x6b, 0x46, 0x7d, 0xde, 0xc8, 0x37, 0x73, 0xad, 0x72, 0x5b, 0xcf, 0x16, 0x39, 0x2e, 0xe7,
  657. 0x8f, 0x21, 0xa8, 0xef, 0x08, 0xff, 0x81, 0xc4, 0x14, 0xed, 0x15, 0x54, 0xd2, 0x07, 0xb1, 0xd7,
  658. 0x70, 0x08, 0xb2, 0x5e, 0x95, 0x94, 0xd7, 0x57, 0xca, 0x35, 0xd2, 0xff, 0x42, 0xa0, 0x76, 0x7d,
  659. 0x77, 0xb1, 0x99, 0xeb, 0xaf, 0x20, 0x3f, 0xb3, 0x84, 0x15, 0xcd, 0xf5, 0xd9, 0xde, 0x40, 0x88,
  660. 0x84, 0xe0, 0x37, 0x70, 0xea, 0xd3, 0x19, 0xf3, 0xa9, 0x2d, 0xa2, 0x31, 0xde, 0x5a, 0x83, 0x8c,
  661. 0xb2, 0x41, 0x22, 0x6c, 0x2c, 0x92, 0x90, 0xb5, 0x2b, 0xa8, 0x6d, 0x1d, 0x06, 0xdd, 0x70, 0xe8,
  662. 0xbd, 0x39, 0x95, 0x0a, 0xc9, 0x40, 0xd3, 0xfb, 0x50, 0x52, 0xff, 0x17, 0x41, 0x75, 0xb4, 0x9e,
  663. 0x2e, 0x19, 0xbf, 0x25, 0xf4, 0x97, 0x35, 0xe5, 0xc1, 0x3e, 0xa5, 0x17, 0xb2, 0x95, 0x8d, 0x24,
  664. 0x8b, 0xdd, 0xb3, 0x8d, 0x71, 0xda, 0xca, 0x93, 0x69, 0x6b, 0xe6, 0x7b, 0xde, 0x3c, 0xfd, 0x77,
  665. 0x05, 0x6a, 0x49, 0xc0, 0xdc, 0x73, 0x1d, 0x4e, 0x71, 0x0f, 0x8a, 0xb6, 0xeb, 0xbc, 0x63, 0xf3,
  666. 0xfd, 0x17, 0xce, 0x16, 0xdc, 0xe8, 0x49, 0x6c, 0x1c, 0x77, 0x44, 0xc5, 0x83, 0x9d, 0x86, 0x7d,
  667. 0x73, 0x58, 0xe6, 0xf1, 0x96, 0x5d, 0x83, 0x9a, 0xf1, 0x81, 0xbf, 0x84, 0x5a, 0x92, 0x81, 0x69,
  668. 0xbb, 0x6b, 0x27, 0xec, 0x44, 0x81, 0x54, 0x13, 0x73, 0x2f, 0xb0, 0x1e, 0xd1, 0xec, 0x3f, 0x10,
  669. 0x9c, 0x85, 0xce, 0xd6, 0x3e, 0x9d, 0x04, 0x05, 0x8c, 0x7b, 0x7e, 0x4c, 0xed, 0x7f, 0x00, 0xd5,
  670. 0x8e, 0xc4, 0xac, 0xa4, 0xfe, 0xe5, 0x76, 0x33, 0x5b, 0x09, 0xe9, 0xa6, 0x97, 0xc6, 0x91, 0x2c,
  671. 0x4d, 0x6f, 0xc0, 0x47, 0xdb, 0x41, 0x85, 0x55, 0xd3, 0x09, 0x9c, 0xbf, 0xa1, 0x62, 0x8f, 0xc2,
  672. 0xf1, 0x51, 0xeb, 0x73, 0xb8, 0x78, 0x44, 0x33, 0x1a, 0x90, 0x9d, 0xb4, 0xd0, 0x71, 0x69, 0xfd,
  673. 0x89, 0x00, 0xef, 0xa2, 0x9e, 0xdd, 0x5e, 0xfc, 0x09, 0x80, 0xed, 0x2e, 0x97, 0xd4, 0x96, 0x41,
  674. 0x84, 0x39, 0xa4, 0x2c, 0xc1, 0xad, 0xef, 0x53, 0x6f, 0xc9, 0xec, 0x4d, 0xf1, 0x4b, 0x24, 0x6d,
  675. 0xc2, 0x9f, 0x41, 0x85, 0x71, 0x53, 0xf8, 0x96, 0xc3, 0x19, 0x75, 0x84, 0xfc, 0xee, 0x9c, 0x92,
  676. 0x32, 0xe3, 0x93, 0xd8, 0xd4, 0xfe, 0x2d, 0x07, 0xf5, 0x31, 0xb5, 0xee, 0x29, 0x9d, 0x0d, 0xe3,
  677. 0xf4, 0xf0, 0x4f, 0x50, 0x4a, 0xbe, 0x46, 0xf8, 0xd3, 0x27, 0x3e, 0x53, 0xda, 0xc7, 0x07, 0xae,
  678. 0x2a, 0xfd, 0x45, 0x0b, 0x5d, 0x21, 0x7c, 0x03, 0x27, 0xd1, 0x42, 0xe0, 0xf3, 0x43, 0xd7, 0x89,
  679. 0x76, 0x71, 0x70, 0x8b, 0x22, 0xb5, 0x9f, 0xa1, 0x9a, 0x9d, 0x17, 0xfc, 0x32, 0x4b, 0xdb, 0x3b,
  680. 0xe2, 0xda, 0xe7, 0x87, 0x41, 0xb1, 0x0b, 0xec, 0xc3, 0xd9, 0xde, 0x01, 0xc1, 0x5b, 0xbf, 0x16,
  681. 0x87, 0x26, 0x53, 0xbb, 0x7c, 0x16, 0x36, 0xf6, 0xd9, 0xd5, 0xa1, 0xce, 0xc3, 0x2e, 0xbc, 0xe3,
  682. 0x86, 0xbd, 0x0c, 0x5a, 0xd3, 0xad, 0x26, 0x0d, 0x19, 0x05, 0xff, 0x52, 0xd3, 0xa2, 0xfc, 0xa5,
  683. 0xfa, 0xf6, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x6c, 0x82, 0x62, 0x65, 0x09, 0x00, 0x00,
  684. }