Documentation
¶
Index ¶
Constants ¶
const ( Exchange_Send_FullMethodName = "/exchange.Exchange/Send" Exchange_Next_FullMethodName = "/exchange.Exchange/Next" )
Variables ¶
var Exchange_ServiceDesc = grpc.ServiceDesc{ ServiceName: "exchange.Exchange", HandlerType: (*ExchangeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Send", Handler: _Exchange_Send_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Next", Handler: _Exchange_Next_Handler, ServerStreams: true, }, }, Metadata: "exchange.proto", }
Exchange_ServiceDesc is the grpc.ServiceDesc for Exchange service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_exchange_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExchangeServer ¶
func RegisterExchangeServer(s grpc.ServiceRegistrar, srv ExchangeServer)
Types ¶
type ExchangeClient ¶
type ExchangeClient interface { Send(ctx context.Context, in *SendReq, opts ...grpc.CallOption) (*SendRes, error) Next(ctx context.Context, in *NextReq, opts ...grpc.CallOption) (Exchange_NextClient, error) }
ExchangeClient is the client API for Exchange service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewExchangeClient ¶
func NewExchangeClient(cc grpc.ClientConnInterface) ExchangeClient
type ExchangeServer ¶
type ExchangeServer interface { Send(context.Context, *SendReq) (*SendRes, error) Next(*NextReq, Exchange_NextServer) error // contains filtered or unexported methods }
ExchangeServer is the server API for Exchange service. All implementations must embed UnimplementedExchangeServer for forward compatibility
type Exchange_NextClient ¶
type Exchange_NextClient interface { Recv() (*NextRes, error) grpc.ClientStream }
type Exchange_NextServer ¶
type Exchange_NextServer interface { Send(*NextRes) error grpc.ServerStream }
type NextReq ¶
type NextReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NextReq) Descriptor
deprecated
func (*NextReq) ProtoMessage ¶
func (*NextReq) ProtoMessage()
func (*NextReq) ProtoReflect ¶
func (x *NextReq) ProtoReflect() protoreflect.Message
type NextRes ¶
type NextRes struct { Msgbody string `protobuf:"bytes,1,opt,name=msgbody,proto3" json:"msgbody,omitempty"` // contains filtered or unexported fields }
func (*NextRes) Descriptor
deprecated
func (*NextRes) GetMsgbody ¶
func (*NextRes) ProtoMessage ¶
func (*NextRes) ProtoMessage()
func (*NextRes) ProtoReflect ¶
func (x *NextRes) ProtoReflect() protoreflect.Message
type SendReq ¶
type SendReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Msgbody string `protobuf:"bytes,2,opt,name=msgbody,proto3" json:"msgbody,omitempty"` // contains filtered or unexported fields }
func (*SendReq) Descriptor
deprecated
func (*SendReq) GetMsgbody ¶
func (*SendReq) ProtoMessage ¶
func (*SendReq) ProtoMessage()
func (*SendReq) ProtoReflect ¶
func (x *SendReq) ProtoReflect() protoreflect.Message
type SendRes ¶
type SendRes struct {
// contains filtered or unexported fields
}
func (*SendRes) Descriptor
deprecated
func (*SendRes) ProtoMessage ¶
func (*SendRes) ProtoMessage()
func (*SendRes) ProtoReflect ¶
func (x *SendRes) ProtoReflect() protoreflect.Message
type UnimplementedExchangeServer ¶
type UnimplementedExchangeServer struct { }
UnimplementedExchangeServer must be embedded to have forward compatible implementations.
func (UnimplementedExchangeServer) Next ¶
func (UnimplementedExchangeServer) Next(*NextReq, Exchange_NextServer) error
type UnsafeExchangeServer ¶
type UnsafeExchangeServer interface {
// contains filtered or unexported methods
}
UnsafeExchangeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExchangeServer will result in compilation errors.