Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_hello_proto protoreflect.FileDescriptor
var Greet_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.Greet", HandlerType: (*GreetServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greet_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hello.proto", }
Greet_ServiceDesc is the grpc.ServiceDesc for Greet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetServer ¶
func RegisterGreetServer(s grpc.ServiceRegistrar, srv GreetServer)
Types ¶
type GreetClient ¶
type GreetClient interface {
SayHello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloResp, error)
}
GreetClient is the client API for Greet 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 NewGreetClient ¶
func NewGreetClient(cc grpc.ClientConnInterface) GreetClient
type GreetServer ¶
type GreetServer interface { SayHello(context.Context, *HelloReq) (*HelloResp, error) // contains filtered or unexported methods }
GreetServer is the server API for Greet service. All implementations must embed UnimplementedGreetServer for forward compatibility
type HelloReq ¶
type HelloReq struct { In string `protobuf:"bytes,1,opt,name=in,proto3" json:"in,omitempty"` // contains filtered or unexported fields }
func (*HelloReq) Descriptor
deprecated
func (*HelloReq) ProtoMessage ¶
func (*HelloReq) ProtoMessage()
func (*HelloReq) ProtoReflect ¶
func (x *HelloReq) ProtoReflect() protoreflect.Message
type HelloResp ¶
type HelloResp struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*HelloResp) Descriptor
deprecated
func (*HelloResp) ProtoMessage ¶
func (*HelloResp) ProtoMessage()
func (*HelloResp) ProtoReflect ¶
func (x *HelloResp) ProtoReflect() protoreflect.Message
type UnimplementedGreetServer ¶
type UnimplementedGreetServer struct { }
UnimplementedGreetServer must be embedded to have forward compatible implementations.
type UnsafeGreetServer ¶
type UnsafeGreetServer interface {
// contains filtered or unexported methods
}
UnsafeGreetServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetServer will result in compilation errors.