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.

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