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