Documentation ¶
Index ¶
- Variables
- func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
- type EchoClient
- type EchoRequest
- type EchoResponse
- type EchoServer
- type Echo_BidirectionalStreamingEchoClient
- type Echo_BidirectionalStreamingEchoServer
- type Echo_ClientStreamingEchoClient
- type Echo_ClientStreamingEchoServer
- type Echo_ServerStreamingEchoClient
- type Echo_ServerStreamingEchoServer
- type UnimplementedEchoServer
- func (UnimplementedEchoServer) BidirectionalStreamingEcho(Echo_BidirectionalStreamingEchoServer) error
- func (UnimplementedEchoServer) ClientStreamingEcho(Echo_ClientStreamingEchoServer) error
- func (UnimplementedEchoServer) ServerStreamingEcho(*EchoRequest, Echo_ServerStreamingEchoServer) error
- func (UnimplementedEchoServer) UnaryEcho(context.Context, *EchoRequest) (*EchoResponse, error)
- type UnsafeEchoServer
Constants ¶
This section is empty.
Variables ¶
var Echo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Echo", HandlerType: (*EchoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UnaryEcho", Handler: _Echo_UnaryEcho_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ServerStreamingEcho", Handler: _Echo_ServerStreamingEcho_Handler, ServerStreams: true, }, { StreamName: "ClientStreamingEcho", Handler: _Echo_ClientStreamingEcho_Handler, ClientStreams: true, }, { StreamName: "BidirectionalStreamingEcho", Handler: _Echo_BidirectionalStreamingEcho_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "echo.proto", }
Echo_ServiceDesc is the grpc.ServiceDesc for Echo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServer ¶
func RegisterEchoServer(s grpc.ServiceRegistrar, srv EchoServer)
Types ¶
type EchoClient ¶
type EchoClient interface { // UnaryEcho is unary echo. UnaryEcho(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) // ServerStreamingEcho is server side streaming. ServerStreamingEcho(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (Echo_ServerStreamingEchoClient, error) // ClientStreamingEcho is client side streaming. ClientStreamingEcho(ctx context.Context, opts ...grpc.CallOption) (Echo_ClientStreamingEchoClient, error) // BidirectionalStreamingEcho is bidi streaming. BidirectionalStreamingEcho(ctx context.Context, opts ...grpc.CallOption) (Echo_BidirectionalStreamingEchoClient, error) }
EchoClient is the client API for Echo 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 NewEchoClient ¶
func NewEchoClient(cc grpc.ClientConnInterface) EchoClient
type EchoRequest ¶
type EchoRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
EchoRequest is the request for echo.
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetMessage ¶
func (x *EchoRequest) GetMessage() string
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) ProtoReflect ¶
func (x *EchoRequest) ProtoReflect() protoreflect.Message
func (*EchoRequest) Reset ¶
func (x *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (x *EchoRequest) String() string
type EchoResponse ¶
type EchoResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
EchoResponse is the response for echo.
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetMessage ¶
func (x *EchoResponse) GetMessage() string
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) ProtoReflect ¶
func (x *EchoResponse) ProtoReflect() protoreflect.Message
func (*EchoResponse) Reset ¶
func (x *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (x *EchoResponse) String() string
type EchoServer ¶
type EchoServer interface { // UnaryEcho is unary echo. UnaryEcho(context.Context, *EchoRequest) (*EchoResponse, error) // ServerStreamingEcho is server side streaming. ServerStreamingEcho(*EchoRequest, Echo_ServerStreamingEchoServer) error // ClientStreamingEcho is client side streaming. ClientStreamingEcho(Echo_ClientStreamingEchoServer) error // BidirectionalStreamingEcho is bidi streaming. BidirectionalStreamingEcho(Echo_BidirectionalStreamingEchoServer) error // contains filtered or unexported methods }
EchoServer is the server API for Echo service. All implementations must embed UnimplementedEchoServer for forward compatibility
type Echo_BidirectionalStreamingEchoClient ¶
type Echo_BidirectionalStreamingEchoClient interface { Send(*EchoRequest) error Recv() (*EchoResponse, error) grpc.ClientStream }
type Echo_BidirectionalStreamingEchoServer ¶
type Echo_BidirectionalStreamingEchoServer interface { Send(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream }
type Echo_ClientStreamingEchoClient ¶
type Echo_ClientStreamingEchoClient interface { Send(*EchoRequest) error CloseAndRecv() (*EchoResponse, error) grpc.ClientStream }
type Echo_ClientStreamingEchoServer ¶
type Echo_ClientStreamingEchoServer interface { SendAndClose(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream }
type Echo_ServerStreamingEchoClient ¶
type Echo_ServerStreamingEchoClient interface { Recv() (*EchoResponse, error) grpc.ClientStream }
type Echo_ServerStreamingEchoServer ¶
type Echo_ServerStreamingEchoServer interface { Send(*EchoResponse) error grpc.ServerStream }
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServer) BidirectionalStreamingEcho ¶
func (UnimplementedEchoServer) BidirectionalStreamingEcho(Echo_BidirectionalStreamingEchoServer) error
func (UnimplementedEchoServer) ClientStreamingEcho ¶
func (UnimplementedEchoServer) ClientStreamingEcho(Echo_ClientStreamingEchoServer) error
func (UnimplementedEchoServer) ServerStreamingEcho ¶
func (UnimplementedEchoServer) ServerStreamingEcho(*EchoRequest, Echo_ServerStreamingEchoServer) error
func (UnimplementedEchoServer) UnaryEcho ¶
func (UnimplementedEchoServer) UnaryEcho(context.Context, *EchoRequest) (*EchoResponse, error)
type UnsafeEchoServer ¶
type UnsafeEchoServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServer will result in compilation errors.