Documentation ¶
Index ¶
Constants ¶
const (
HelloGRPC_SayHi_FullMethodName = "/hello_grpc.HelloGRPC/SayHi"
)
Variables ¶
var File_hello_proto protoreflect.FileDescriptor
var HelloGRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello_grpc.HelloGRPC", HandlerType: (*HelloGRPCServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHi", Handler: _HelloGRPC_SayHi_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hello.proto", }
HelloGRPC_ServiceDesc is the grpc.ServiceDesc for HelloGRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloGRPCServer ¶
func RegisterHelloGRPCServer(s grpc.ServiceRegistrar, srv HelloGRPCServer)
Types ¶
type HelloGRPCClient ¶
type HelloGRPCClient interface {
SayHi(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
}
HelloGRPCClient is the client API for HelloGRPC 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 NewHelloGRPCClient ¶
func NewHelloGRPCClient(cc grpc.ClientConnInterface) HelloGRPCClient
type HelloGRPCServer ¶
type HelloGRPCServer interface { SayHi(context.Context, *Req) (*Res, error) // contains filtered or unexported methods }
HelloGRPCServer is the server API for HelloGRPC service. All implementations must embed UnimplementedHelloGRPCServer for forward compatibility
type Req ¶
type Req struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Req) Descriptor
deprecated
func (*Req) GetMessage ¶
func (*Req) ProtoMessage ¶
func (*Req) ProtoMessage()
func (*Req) ProtoReflect ¶
func (x *Req) ProtoReflect() protoreflect.Message
type Res ¶
type Res struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Res) Descriptor
deprecated
func (*Res) GetMessage ¶
func (*Res) ProtoMessage ¶
func (*Res) ProtoMessage()
func (*Res) ProtoReflect ¶
func (x *Res) ProtoReflect() protoreflect.Message
type UnimplementedHelloGRPCServer ¶
type UnimplementedHelloGRPCServer struct { }
UnimplementedHelloGRPCServer must be embedded to have forward compatible implementations.
type UnsafeHelloGRPCServer ¶
type UnsafeHelloGRPCServer interface {
// contains filtered or unexported methods
}
UnsafeHelloGRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloGRPCServer will result in compilation errors.