Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EchoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.echopb.EchoService", HandlerType: (*EchoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UnaryEcho", Handler: _EchoService_UnaryEcho_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/echopb/echo.proto", }
EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_v1_echopb_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
Types ¶
type EchoServiceClient ¶
type EchoServiceClient interface { // UnaryEcho sends a message to the server and returns the same message back. UnaryEcho(ctx context.Context, in *UnaryEchoRequest, opts ...grpc.CallOption) (*UnaryEchoResponse, error) }
EchoServiceClient is the client API for EchoService 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 NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface { // UnaryEcho sends a message to the server and returns the same message back. UnaryEcho(context.Context, *UnaryEchoRequest) (*UnaryEchoResponse, error) // contains filtered or unexported methods }
EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility
type UnaryEchoRequest ¶
type UnaryEchoRequest struct { // Message to be sent. Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*UnaryEchoRequest) Descriptor
deprecated
func (*UnaryEchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UnaryEchoRequest.ProtoReflect.Descriptor instead.
func (*UnaryEchoRequest) GetMsg ¶
func (x *UnaryEchoRequest) GetMsg() string
func (*UnaryEchoRequest) ProtoMessage ¶
func (*UnaryEchoRequest) ProtoMessage()
func (*UnaryEchoRequest) ProtoReflect ¶
func (x *UnaryEchoRequest) ProtoReflect() protoreflect.Message
func (*UnaryEchoRequest) Reset ¶
func (x *UnaryEchoRequest) Reset()
func (*UnaryEchoRequest) String ¶
func (x *UnaryEchoRequest) String() string
type UnaryEchoResponse ¶
type UnaryEchoResponse struct { // Message to be received. Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*UnaryEchoResponse) Descriptor
deprecated
func (*UnaryEchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UnaryEchoResponse.ProtoReflect.Descriptor instead.
func (*UnaryEchoResponse) GetMsg ¶
func (x *UnaryEchoResponse) GetMsg() string
func (*UnaryEchoResponse) ProtoMessage ¶
func (*UnaryEchoResponse) ProtoMessage()
func (*UnaryEchoResponse) ProtoReflect ¶
func (x *UnaryEchoResponse) ProtoReflect() protoreflect.Message
func (*UnaryEchoResponse) Reset ¶
func (x *UnaryEchoResponse) Reset()
func (*UnaryEchoResponse) String ¶
func (x *UnaryEchoResponse) String() string
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct { }
UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServiceServer) UnaryEcho ¶
func (UnimplementedEchoServiceServer) UnaryEcho(context.Context, *UnaryEchoRequest) (*UnaryEchoResponse, error)
type UnsafeEchoServiceServer ¶
type UnsafeEchoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.