github.com/annwntech/go-micro/v2@v2.9.5/broker/service/proto/broker.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.13.0 5 // source: broker/service/proto/broker.proto 6 7 package go_micro_broker 8 9 import ( 10 context "context" 11 proto "github.com/golang/protobuf/proto" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 16 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 17 reflect "reflect" 18 sync "sync" 19 ) 20 21 const ( 22 // Verify that this generated code is sufficiently up-to-date. 23 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 24 // Verify that runtime/protoimpl is sufficiently up-to-date. 25 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 26 ) 27 28 // This is a compile-time assertion that a sufficiently up-to-date version 29 // of the legacy proto package is being used. 30 const _ = proto.ProtoPackageIsVersion4 31 32 type Empty struct { 33 state protoimpl.MessageState 34 sizeCache protoimpl.SizeCache 35 unknownFields protoimpl.UnknownFields 36 } 37 38 func (x *Empty) Reset() { 39 *x = Empty{} 40 if protoimpl.UnsafeEnabled { 41 mi := &file_broker_service_proto_broker_proto_msgTypes[0] 42 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 43 ms.StoreMessageInfo(mi) 44 } 45 } 46 47 func (x *Empty) String() string { 48 return protoimpl.X.MessageStringOf(x) 49 } 50 51 func (*Empty) ProtoMessage() {} 52 53 func (x *Empty) ProtoReflect() protoreflect.Message { 54 mi := &file_broker_service_proto_broker_proto_msgTypes[0] 55 if protoimpl.UnsafeEnabled && x != nil { 56 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 57 if ms.LoadMessageInfo() == nil { 58 ms.StoreMessageInfo(mi) 59 } 60 return ms 61 } 62 return mi.MessageOf(x) 63 } 64 65 // Deprecated: Use Empty.ProtoReflect.Descriptor instead. 66 func (*Empty) Descriptor() ([]byte, []int) { 67 return file_broker_service_proto_broker_proto_rawDescGZIP(), []int{0} 68 } 69 70 type PublishRequest struct { 71 state protoimpl.MessageState 72 sizeCache protoimpl.SizeCache 73 unknownFields protoimpl.UnknownFields 74 75 Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` 76 Message *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 77 } 78 79 func (x *PublishRequest) Reset() { 80 *x = PublishRequest{} 81 if protoimpl.UnsafeEnabled { 82 mi := &file_broker_service_proto_broker_proto_msgTypes[1] 83 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 84 ms.StoreMessageInfo(mi) 85 } 86 } 87 88 func (x *PublishRequest) String() string { 89 return protoimpl.X.MessageStringOf(x) 90 } 91 92 func (*PublishRequest) ProtoMessage() {} 93 94 func (x *PublishRequest) ProtoReflect() protoreflect.Message { 95 mi := &file_broker_service_proto_broker_proto_msgTypes[1] 96 if protoimpl.UnsafeEnabled && x != nil { 97 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 98 if ms.LoadMessageInfo() == nil { 99 ms.StoreMessageInfo(mi) 100 } 101 return ms 102 } 103 return mi.MessageOf(x) 104 } 105 106 // Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead. 107 func (*PublishRequest) Descriptor() ([]byte, []int) { 108 return file_broker_service_proto_broker_proto_rawDescGZIP(), []int{1} 109 } 110 111 func (x *PublishRequest) GetTopic() string { 112 if x != nil { 113 return x.Topic 114 } 115 return "" 116 } 117 118 func (x *PublishRequest) GetMessage() *Message { 119 if x != nil { 120 return x.Message 121 } 122 return nil 123 } 124 125 type SubscribeRequest struct { 126 state protoimpl.MessageState 127 sizeCache protoimpl.SizeCache 128 unknownFields protoimpl.UnknownFields 129 130 Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` 131 Queue string `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` 132 } 133 134 func (x *SubscribeRequest) Reset() { 135 *x = SubscribeRequest{} 136 if protoimpl.UnsafeEnabled { 137 mi := &file_broker_service_proto_broker_proto_msgTypes[2] 138 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 139 ms.StoreMessageInfo(mi) 140 } 141 } 142 143 func (x *SubscribeRequest) String() string { 144 return protoimpl.X.MessageStringOf(x) 145 } 146 147 func (*SubscribeRequest) ProtoMessage() {} 148 149 func (x *SubscribeRequest) ProtoReflect() protoreflect.Message { 150 mi := &file_broker_service_proto_broker_proto_msgTypes[2] 151 if protoimpl.UnsafeEnabled && x != nil { 152 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 153 if ms.LoadMessageInfo() == nil { 154 ms.StoreMessageInfo(mi) 155 } 156 return ms 157 } 158 return mi.MessageOf(x) 159 } 160 161 // Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead. 162 func (*SubscribeRequest) Descriptor() ([]byte, []int) { 163 return file_broker_service_proto_broker_proto_rawDescGZIP(), []int{2} 164 } 165 166 func (x *SubscribeRequest) GetTopic() string { 167 if x != nil { 168 return x.Topic 169 } 170 return "" 171 } 172 173 func (x *SubscribeRequest) GetQueue() string { 174 if x != nil { 175 return x.Queue 176 } 177 return "" 178 } 179 180 type Message struct { 181 state protoimpl.MessageState 182 sizeCache protoimpl.SizeCache 183 unknownFields protoimpl.UnknownFields 184 185 Header map[string]string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 186 Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` 187 } 188 189 func (x *Message) Reset() { 190 *x = Message{} 191 if protoimpl.UnsafeEnabled { 192 mi := &file_broker_service_proto_broker_proto_msgTypes[3] 193 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 194 ms.StoreMessageInfo(mi) 195 } 196 } 197 198 func (x *Message) String() string { 199 return protoimpl.X.MessageStringOf(x) 200 } 201 202 func (*Message) ProtoMessage() {} 203 204 func (x *Message) ProtoReflect() protoreflect.Message { 205 mi := &file_broker_service_proto_broker_proto_msgTypes[3] 206 if protoimpl.UnsafeEnabled && x != nil { 207 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 208 if ms.LoadMessageInfo() == nil { 209 ms.StoreMessageInfo(mi) 210 } 211 return ms 212 } 213 return mi.MessageOf(x) 214 } 215 216 // Deprecated: Use Message.ProtoReflect.Descriptor instead. 217 func (*Message) Descriptor() ([]byte, []int) { 218 return file_broker_service_proto_broker_proto_rawDescGZIP(), []int{3} 219 } 220 221 func (x *Message) GetHeader() map[string]string { 222 if x != nil { 223 return x.Header 224 } 225 return nil 226 } 227 228 func (x *Message) GetBody() []byte { 229 if x != nil { 230 return x.Body 231 } 232 return nil 233 } 234 235 var File_broker_service_proto_broker_proto protoreflect.FileDescriptor 236 237 var file_broker_service_proto_broker_proto_rawDesc = []byte{ 238 0x0a, 0x21, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 239 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 240 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x72, 241 0x6f, 0x6b, 0x65, 0x72, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5a, 0x0a, 242 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 243 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 244 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 245 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 246 0x6f, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 247 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x0a, 0x10, 0x53, 0x75, 0x62, 248 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 249 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 250 0x70, 0x69, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 251 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x07, 0x4d, 0x65, 252 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 253 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 254 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 255 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 256 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 257 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 258 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 259 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 260 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 261 0x38, 0x01, 0x32, 0x9c, 0x01, 0x0a, 0x06, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x12, 0x44, 0x0a, 262 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 263 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 264 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 265 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x45, 0x6d, 0x70, 0x74, 266 0x79, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 267 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 268 0x65, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 269 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 270 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 271 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 272 } 273 274 var ( 275 file_broker_service_proto_broker_proto_rawDescOnce sync.Once 276 file_broker_service_proto_broker_proto_rawDescData = file_broker_service_proto_broker_proto_rawDesc 277 ) 278 279 func file_broker_service_proto_broker_proto_rawDescGZIP() []byte { 280 file_broker_service_proto_broker_proto_rawDescOnce.Do(func() { 281 file_broker_service_proto_broker_proto_rawDescData = protoimpl.X.CompressGZIP(file_broker_service_proto_broker_proto_rawDescData) 282 }) 283 return file_broker_service_proto_broker_proto_rawDescData 284 } 285 286 var file_broker_service_proto_broker_proto_msgTypes = make([]protoimpl.MessageInfo, 5) 287 var file_broker_service_proto_broker_proto_goTypes = []interface{}{ 288 (*Empty)(nil), // 0: go.micro.broker.Empty 289 (*PublishRequest)(nil), // 1: go.micro.broker.PublishRequest 290 (*SubscribeRequest)(nil), // 2: go.micro.broker.SubscribeRequest 291 (*Message)(nil), // 3: go.micro.broker.Message 292 nil, // 4: go.micro.broker.Message.HeaderEntry 293 } 294 var file_broker_service_proto_broker_proto_depIdxs = []int32{ 295 3, // 0: go.micro.broker.PublishRequest.message:type_name -> go.micro.broker.Message 296 4, // 1: go.micro.broker.Message.header:type_name -> go.micro.broker.Message.HeaderEntry 297 1, // 2: go.micro.broker.Broker.Publish:input_type -> go.micro.broker.PublishRequest 298 2, // 3: go.micro.broker.Broker.Subscribe:input_type -> go.micro.broker.SubscribeRequest 299 0, // 4: go.micro.broker.Broker.Publish:output_type -> go.micro.broker.Empty 300 3, // 5: go.micro.broker.Broker.Subscribe:output_type -> go.micro.broker.Message 301 4, // [4:6] is the sub-list for method output_type 302 2, // [2:4] is the sub-list for method input_type 303 2, // [2:2] is the sub-list for extension type_name 304 2, // [2:2] is the sub-list for extension extendee 305 0, // [0:2] is the sub-list for field type_name 306 } 307 308 func init() { file_broker_service_proto_broker_proto_init() } 309 func file_broker_service_proto_broker_proto_init() { 310 if File_broker_service_proto_broker_proto != nil { 311 return 312 } 313 if !protoimpl.UnsafeEnabled { 314 file_broker_service_proto_broker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 315 switch v := v.(*Empty); i { 316 case 0: 317 return &v.state 318 case 1: 319 return &v.sizeCache 320 case 2: 321 return &v.unknownFields 322 default: 323 return nil 324 } 325 } 326 file_broker_service_proto_broker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 327 switch v := v.(*PublishRequest); i { 328 case 0: 329 return &v.state 330 case 1: 331 return &v.sizeCache 332 case 2: 333 return &v.unknownFields 334 default: 335 return nil 336 } 337 } 338 file_broker_service_proto_broker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 339 switch v := v.(*SubscribeRequest); i { 340 case 0: 341 return &v.state 342 case 1: 343 return &v.sizeCache 344 case 2: 345 return &v.unknownFields 346 default: 347 return nil 348 } 349 } 350 file_broker_service_proto_broker_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 351 switch v := v.(*Message); i { 352 case 0: 353 return &v.state 354 case 1: 355 return &v.sizeCache 356 case 2: 357 return &v.unknownFields 358 default: 359 return nil 360 } 361 } 362 } 363 type x struct{} 364 out := protoimpl.TypeBuilder{ 365 File: protoimpl.DescBuilder{ 366 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 367 RawDescriptor: file_broker_service_proto_broker_proto_rawDesc, 368 NumEnums: 0, 369 NumMessages: 5, 370 NumExtensions: 0, 371 NumServices: 1, 372 }, 373 GoTypes: file_broker_service_proto_broker_proto_goTypes, 374 DependencyIndexes: file_broker_service_proto_broker_proto_depIdxs, 375 MessageInfos: file_broker_service_proto_broker_proto_msgTypes, 376 }.Build() 377 File_broker_service_proto_broker_proto = out.File 378 file_broker_service_proto_broker_proto_rawDesc = nil 379 file_broker_service_proto_broker_proto_goTypes = nil 380 file_broker_service_proto_broker_proto_depIdxs = nil 381 } 382 383 // Reference imports to suppress errors if they are not otherwise used. 384 var _ context.Context 385 var _ grpc.ClientConnInterface 386 387 // This is a compile-time assertion to ensure that this generated file 388 // is compatible with the grpc package it is being compiled against. 389 const _ = grpc.SupportPackageIsVersion6 390 391 // BrokerClient is the client API for Broker service. 392 // 393 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 394 type BrokerClient interface { 395 Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*Empty, error) 396 Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Broker_SubscribeClient, error) 397 } 398 399 type brokerClient struct { 400 cc grpc.ClientConnInterface 401 } 402 403 func NewBrokerClient(cc grpc.ClientConnInterface) BrokerClient { 404 return &brokerClient{cc} 405 } 406 407 func (c *brokerClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*Empty, error) { 408 out := new(Empty) 409 err := c.cc.Invoke(ctx, "/go.micro.broker.Broker/Publish", in, out, opts...) 410 if err != nil { 411 return nil, err 412 } 413 return out, nil 414 } 415 416 func (c *brokerClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Broker_SubscribeClient, error) { 417 stream, err := c.cc.NewStream(ctx, &_Broker_serviceDesc.Streams[0], "/go.micro.broker.Broker/Subscribe", opts...) 418 if err != nil { 419 return nil, err 420 } 421 x := &brokerSubscribeClient{stream} 422 if err := x.ClientStream.SendMsg(in); err != nil { 423 return nil, err 424 } 425 if err := x.ClientStream.CloseSend(); err != nil { 426 return nil, err 427 } 428 return x, nil 429 } 430 431 type Broker_SubscribeClient interface { 432 Recv() (*Message, error) 433 grpc.ClientStream 434 } 435 436 type brokerSubscribeClient struct { 437 grpc.ClientStream 438 } 439 440 func (x *brokerSubscribeClient) Recv() (*Message, error) { 441 m := new(Message) 442 if err := x.ClientStream.RecvMsg(m); err != nil { 443 return nil, err 444 } 445 return m, nil 446 } 447 448 // BrokerServer is the server API for Broker service. 449 type BrokerServer interface { 450 Publish(context.Context, *PublishRequest) (*Empty, error) 451 Subscribe(*SubscribeRequest, Broker_SubscribeServer) error 452 } 453 454 // UnimplementedBrokerServer can be embedded to have forward compatible implementations. 455 type UnimplementedBrokerServer struct { 456 } 457 458 func (*UnimplementedBrokerServer) Publish(context.Context, *PublishRequest) (*Empty, error) { 459 return nil, status.Errorf(codes.Unimplemented, "method Publish not implemented") 460 } 461 func (*UnimplementedBrokerServer) Subscribe(*SubscribeRequest, Broker_SubscribeServer) error { 462 return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") 463 } 464 465 func RegisterBrokerServer(s *grpc.Server, srv BrokerServer) { 466 s.RegisterService(&_Broker_serviceDesc, srv) 467 } 468 469 func _Broker_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 470 in := new(PublishRequest) 471 if err := dec(in); err != nil { 472 return nil, err 473 } 474 if interceptor == nil { 475 return srv.(BrokerServer).Publish(ctx, in) 476 } 477 info := &grpc.UnaryServerInfo{ 478 Server: srv, 479 FullMethod: "/go.micro.broker.Broker/Publish", 480 } 481 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 482 return srv.(BrokerServer).Publish(ctx, req.(*PublishRequest)) 483 } 484 return interceptor(ctx, in, info, handler) 485 } 486 487 func _Broker_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { 488 m := new(SubscribeRequest) 489 if err := stream.RecvMsg(m); err != nil { 490 return err 491 } 492 return srv.(BrokerServer).Subscribe(m, &brokerSubscribeServer{stream}) 493 } 494 495 type Broker_SubscribeServer interface { 496 Send(*Message) error 497 grpc.ServerStream 498 } 499 500 type brokerSubscribeServer struct { 501 grpc.ServerStream 502 } 503 504 func (x *brokerSubscribeServer) Send(m *Message) error { 505 return x.ServerStream.SendMsg(m) 506 } 507 508 var _Broker_serviceDesc = grpc.ServiceDesc{ 509 ServiceName: "go.micro.broker.Broker", 510 HandlerType: (*BrokerServer)(nil), 511 Methods: []grpc.MethodDesc{ 512 { 513 MethodName: "Publish", 514 Handler: _Broker_Publish_Handler, 515 }, 516 }, 517 Streams: []grpc.StreamDesc{ 518 { 519 StreamName: "Subscribe", 520 Handler: _Broker_Subscribe_Handler, 521 ServerStreams: true, 522 }, 523 }, 524 Metadata: "broker/service/proto/broker.proto", 525 }