grpc_broker.pb.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: grpc_broker.proto
  3. /*
  4. Package plugin is a generated protocol buffer package.
  5. It is generated from these files:
  6. grpc_broker.proto
  7. It has these top-level messages:
  8. ConnInfo
  9. */
  10. package plugin
  11. import proto "github.com/golang/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import (
  15. context "golang.org/x/net/context"
  16. grpc "google.golang.org/grpc"
  17. )
  18. // Reference imports to suppress errors if they are not otherwise used.
  19. var _ = proto.Marshal
  20. var _ = fmt.Errorf
  21. var _ = math.Inf
  22. // This is a compile-time assertion to ensure that this generated file
  23. // is compatible with the proto package it is being compiled against.
  24. // A compilation error at this line likely means your copy of the
  25. // proto package needs to be updated.
  26. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  27. type ConnInfo struct {
  28. ServiceId uint32 `protobuf:"varint,1,opt,name=service_id,json=serviceId" json:"service_id,omitempty"`
  29. Network string `protobuf:"bytes,2,opt,name=network" json:"network,omitempty"`
  30. Address string `protobuf:"bytes,3,opt,name=address" json:"address,omitempty"`
  31. }
  32. func (m *ConnInfo) Reset() { *m = ConnInfo{} }
  33. func (m *ConnInfo) String() string { return proto.CompactTextString(m) }
  34. func (*ConnInfo) ProtoMessage() {}
  35. func (*ConnInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  36. func (m *ConnInfo) GetServiceId() uint32 {
  37. if m != nil {
  38. return m.ServiceId
  39. }
  40. return 0
  41. }
  42. func (m *ConnInfo) GetNetwork() string {
  43. if m != nil {
  44. return m.Network
  45. }
  46. return ""
  47. }
  48. func (m *ConnInfo) GetAddress() string {
  49. if m != nil {
  50. return m.Address
  51. }
  52. return ""
  53. }
  54. func init() {
  55. proto.RegisterType((*ConnInfo)(nil), "plugin.ConnInfo")
  56. }
  57. // Reference imports to suppress errors if they are not otherwise used.
  58. var _ context.Context
  59. var _ grpc.ClientConn
  60. // This is a compile-time assertion to ensure that this generated file
  61. // is compatible with the grpc package it is being compiled against.
  62. const _ = grpc.SupportPackageIsVersion4
  63. // Client API for GRPCBroker service
  64. type GRPCBrokerClient interface {
  65. StartStream(ctx context.Context, opts ...grpc.CallOption) (GRPCBroker_StartStreamClient, error)
  66. }
  67. type gRPCBrokerClient struct {
  68. cc *grpc.ClientConn
  69. }
  70. func NewGRPCBrokerClient(cc *grpc.ClientConn) GRPCBrokerClient {
  71. return &gRPCBrokerClient{cc}
  72. }
  73. func (c *gRPCBrokerClient) StartStream(ctx context.Context, opts ...grpc.CallOption) (GRPCBroker_StartStreamClient, error) {
  74. stream, err := grpc.NewClientStream(ctx, &_GRPCBroker_serviceDesc.Streams[0], c.cc, "/plugin.GRPCBroker/StartStream", opts...)
  75. if err != nil {
  76. return nil, err
  77. }
  78. x := &gRPCBrokerStartStreamClient{stream}
  79. return x, nil
  80. }
  81. type GRPCBroker_StartStreamClient interface {
  82. Send(*ConnInfo) error
  83. Recv() (*ConnInfo, error)
  84. grpc.ClientStream
  85. }
  86. type gRPCBrokerStartStreamClient struct {
  87. grpc.ClientStream
  88. }
  89. func (x *gRPCBrokerStartStreamClient) Send(m *ConnInfo) error {
  90. return x.ClientStream.SendMsg(m)
  91. }
  92. func (x *gRPCBrokerStartStreamClient) Recv() (*ConnInfo, error) {
  93. m := new(ConnInfo)
  94. if err := x.ClientStream.RecvMsg(m); err != nil {
  95. return nil, err
  96. }
  97. return m, nil
  98. }
  99. // Server API for GRPCBroker service
  100. type GRPCBrokerServer interface {
  101. StartStream(GRPCBroker_StartStreamServer) error
  102. }
  103. func RegisterGRPCBrokerServer(s *grpc.Server, srv GRPCBrokerServer) {
  104. s.RegisterService(&_GRPCBroker_serviceDesc, srv)
  105. }
  106. func _GRPCBroker_StartStream_Handler(srv interface{}, stream grpc.ServerStream) error {
  107. return srv.(GRPCBrokerServer).StartStream(&gRPCBrokerStartStreamServer{stream})
  108. }
  109. type GRPCBroker_StartStreamServer interface {
  110. Send(*ConnInfo) error
  111. Recv() (*ConnInfo, error)
  112. grpc.ServerStream
  113. }
  114. type gRPCBrokerStartStreamServer struct {
  115. grpc.ServerStream
  116. }
  117. func (x *gRPCBrokerStartStreamServer) Send(m *ConnInfo) error {
  118. return x.ServerStream.SendMsg(m)
  119. }
  120. func (x *gRPCBrokerStartStreamServer) Recv() (*ConnInfo, error) {
  121. m := new(ConnInfo)
  122. if err := x.ServerStream.RecvMsg(m); err != nil {
  123. return nil, err
  124. }
  125. return m, nil
  126. }
  127. var _GRPCBroker_serviceDesc = grpc.ServiceDesc{
  128. ServiceName: "plugin.GRPCBroker",
  129. HandlerType: (*GRPCBrokerServer)(nil),
  130. Methods: []grpc.MethodDesc{},
  131. Streams: []grpc.StreamDesc{
  132. {
  133. StreamName: "StartStream",
  134. Handler: _GRPCBroker_StartStream_Handler,
  135. ServerStreams: true,
  136. ClientStreams: true,
  137. },
  138. },
  139. Metadata: "grpc_broker.proto",
  140. }
  141. func init() { proto.RegisterFile("grpc_broker.proto", fileDescriptor0) }
  142. var fileDescriptor0 = []byte{
  143. // 170 bytes of a gzipped FileDescriptorProto
  144. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0x2f, 0x2a, 0x48,
  145. 0x8e, 0x4f, 0x2a, 0xca, 0xcf, 0x4e, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2b,
  146. 0xc8, 0x29, 0x4d, 0xcf, 0xcc, 0x53, 0x8a, 0xe5, 0xe2, 0x70, 0xce, 0xcf, 0xcb, 0xf3, 0xcc, 0x4b,
  147. 0xcb, 0x17, 0x92, 0xe5, 0xe2, 0x2a, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x8d, 0xcf, 0x4c, 0x91,
  148. 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0xe2, 0x84, 0x8a, 0x78, 0xa6, 0x08, 0x49, 0x70, 0xb1, 0xe7,
  149. 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0x4b, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xb8, 0x20,
  150. 0x99, 0xc4, 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0x62, 0x09, 0x66, 0x88, 0x0c, 0x94, 0x6b, 0xe4, 0xcc,
  151. 0xc5, 0xe5, 0x1e, 0x14, 0xe0, 0xec, 0x04, 0xb6, 0x5a, 0xc8, 0x94, 0x8b, 0x3b, 0xb8, 0x24, 0xb1,
  152. 0xa8, 0x24, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0x57, 0x48, 0x40, 0x0f, 0xe2, 0x08, 0x3d, 0x98, 0x0b,
  153. 0xa4, 0x30, 0x44, 0x34, 0x18, 0x0d, 0x18, 0x93, 0xd8, 0xc0, 0x4e, 0x36, 0x06, 0x04, 0x00, 0x00,
  154. 0xff, 0xff, 0x7b, 0x5d, 0xfb, 0xe1, 0xc7, 0x00, 0x00, 0x00,
  155. }