Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterEchoServerServer(s grpc.ServiceRegistrar, srv EchoServerServer)
- type EchoReply
- type EchoRequest
- type EchoServerClient
- type EchoServerServer
- type EchoServer_SayHelloStreamClient
- type EchoServer_SayHelloStreamServer
- type UnimplementedEchoServerServer
- type UnsafeEchoServerServer
Constants ¶
const ( EchoServer_SayHello_FullMethodName = "/echo.EchoServer/SayHello" EchoServer_SayHelloStream_FullMethodName = "/echo.EchoServer/SayHelloStream" )
Variables ¶
var EchoServer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "echo.EchoServer", HandlerType: (*EchoServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _EchoServer_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SayHelloStream", Handler: _EchoServer_SayHelloStream_Handler, ServerStreams: true, }, }, Metadata: "echo.proto", }
EchoServer_ServiceDesc is the grpc.ServiceDesc for EchoServer 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 RegisterEchoServerServer ¶
func RegisterEchoServerServer(s grpc.ServiceRegistrar, srv EchoServerServer)
Types ¶
type EchoReply ¶
type EchoReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoReply) Descriptor
deprecated
func (*EchoReply) GetMessage ¶
func (*EchoReply) ProtoMessage ¶
func (*EchoReply) ProtoMessage()
func (*EchoReply) ProtoReflect ¶
func (x *EchoReply) ProtoReflect() protoreflect.Message
type EchoRequest ¶
type EchoRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetName ¶
func (x *EchoRequest) GetName() 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 EchoServerClient ¶
type EchoServerClient interface { SayHello(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoReply, error) SayHelloStream(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[EchoReply], error) }
EchoServerClient is the client API for EchoServer 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 NewEchoServerClient ¶
func NewEchoServerClient(cc grpc.ClientConnInterface) EchoServerClient
type EchoServerServer ¶
type EchoServerServer interface { SayHello(context.Context, *EchoRequest) (*EchoReply, error) SayHelloStream(*EchoRequest, grpc.ServerStreamingServer[EchoReply]) error // contains filtered or unexported methods }
EchoServerServer is the server API for EchoServer service. All implementations must embed UnimplementedEchoServerServer for forward compatibility.
type EchoServer_SayHelloStreamClient ¶
type EchoServer_SayHelloStreamClient = grpc.ServerStreamingClient[EchoReply]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type EchoServer_SayHelloStreamServer ¶
type EchoServer_SayHelloStreamServer = grpc.ServerStreamingServer[EchoReply]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedEchoServerServer ¶
type UnimplementedEchoServerServer struct{}
UnimplementedEchoServerServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedEchoServerServer) SayHello ¶
func (UnimplementedEchoServerServer) SayHello(context.Context, *EchoRequest) (*EchoReply, error)
func (UnimplementedEchoServerServer) SayHelloStream ¶
func (UnimplementedEchoServerServer) SayHelloStream(*EchoRequest, grpc.ServerStreamingServer[EchoReply]) error
type UnsafeEchoServerServer ¶
type UnsafeEchoServerServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServerServer will result in compilation errors.