Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Echo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "echo.Echo", HandlerType: (*EchoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Echo_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Echo", Handler: _Echo_Echo_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 { SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) Echo(ctx context.Context, opts ...grpc.CallOption) (Echo_EchoClient, 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 EchoReply ¶
type EchoReply struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*EchoReply) Descriptor
deprecated
func (*EchoReply) ProtoMessage ¶
func (*EchoReply) ProtoMessage()
func (*EchoReply) ProtoReflect ¶
func (x *EchoReply) ProtoReflect() protoreflect.Message
type EchoRequest ¶
type EchoRequest struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetMsg ¶
func (x *EchoRequest) GetMsg() 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 EchoServer ¶
type EchoServer interface { SayHello(context.Context, *HelloRequest) (*HelloReply, error) Echo(Echo_EchoServer) error // contains filtered or unexported methods }
EchoServer is the server API for Echo service. All implementations must embed UnimplementedEchoServer for forward compatibility
type Echo_EchoClient ¶
type Echo_EchoClient interface { Send(*EchoRequest) error Recv() (*EchoReply, error) grpc.ClientStream }
type Echo_EchoServer ¶
type Echo_EchoServer interface { Send(*EchoReply) error Recv() (*EchoRequest, error) grpc.ServerStream }
type HelloReply ¶
type HelloReply struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMsg ¶
func (x *HelloReply) GetMsg() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetMsg ¶
func (x *HelloRequest) GetMsg() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServer) Echo ¶
func (UnimplementedEchoServer) Echo(Echo_EchoServer) error
func (UnimplementedEchoServer) SayHello ¶
func (UnimplementedEchoServer) SayHello(context.Context, *HelloRequest) (*HelloReply, 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.