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