Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_pb_origin_hello_proto protoreflect.FileDescriptor
var Hello_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Hello", HandlerType: (*HelloServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _Hello_Echo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Stream", Handler: _Hello_Stream_Handler, ServerStreams: true, }, }, Metadata: "pb/origin-hello.proto", }
Hello_ServiceDesc is the grpc.ServiceDesc for Hello service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServer ¶
func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer)
Types ¶
type EchoRequest ¶
type EchoRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
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 HelloClient ¶
type HelloClient interface { Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoRequest, error) Stream(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (Hello_StreamClient, error) }
HelloClient is the client API for Hello 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 NewHelloClient ¶
func NewHelloClient(cc grpc.ClientConnInterface) HelloClient
type HelloServer ¶
type HelloServer interface { Echo(context.Context, *EchoRequest) (*EchoRequest, error) Stream(*EchoRequest, Hello_StreamServer) error // contains filtered or unexported methods }
HelloServer is the server API for Hello service. All implementations must embed UnimplementedHelloServer for forward compatibility
type Hello_StreamClient ¶
type Hello_StreamClient interface { Recv() (*EchoRequest, error) grpc.ClientStream }
type Hello_StreamServer ¶
type Hello_StreamServer interface { Send(*EchoRequest) error grpc.ServerStream }
type UnimplementedHelloServer ¶
type UnimplementedHelloServer struct { }
UnimplementedHelloServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServer) Echo ¶
func (UnimplementedHelloServer) Echo(context.Context, *EchoRequest) (*EchoRequest, error)
func (UnimplementedHelloServer) Stream ¶
func (UnimplementedHelloServer) Stream(*EchoRequest, Hello_StreamServer) error
type UnsafeHelloServer ¶
type UnsafeHelloServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServer will result in compilation errors.